Updated routing recipe

This commit is contained in:
Jan Böhmer 2025-11-30 15:01:37 +01:00
parent 3dc66542b2
commit bb650c2218
4 changed files with 31 additions and 22 deletions

2
.env
View file

@ -31,7 +31,7 @@ DATABASE_EMULATE_NATURAL_SORT=0
# General settings # General settings
################################################################################### ###################################################################################
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates # The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates or when no request context is available.
# This must end with a slash! # This must end with a slash!
DEFAULT_URI="https://partdb.changeme.invalid/" DEFAULT_URI="https://partdb.changeme.invalid/"

View file

@ -1548,6 +1548,11 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
* dump_destination?: scalar|null, // A stream URL where dumps should be written to. // Default: null * dump_destination?: scalar|null, // A stream URL where dumps should be written to. // Default: null
* theme?: "dark"|"light", // Changes the color of the dump() output when rendered directly on the templating. "dark" (default) or "light". // Default: "dark" * theme?: "dark"|"light", // Changes the color of the dump() output when rendered directly on the templating. "dark" (default) or "light". // Default: "dark"
* } * }
* @psalm-type MakerConfig = array{
* root_namespace?: scalar|null, // Default: "App"
* generate_final_classes?: bool, // Default: true
* generate_final_entities?: bool, // Default: false
* }
* @psalm-type WebpackEncoreConfig = array{ * @psalm-type WebpackEncoreConfig = array{
* output_path: scalar|null, // The path where Encore is building the assets - i.e. Encore.setOutputPath() * output_path: scalar|null, // The path where Encore is building the assets - i.e. Encore.setOutputPath()
* crossorigin?: false|"anonymous"|"use-credentials", // crossorigin value when Encore.enableIntegrityHashes() is used, can be false (default), anonymous or use-credentials // Default: false * crossorigin?: false|"anonymous"|"use-credentials", // crossorigin value when Encore.enableIntegrityHashes() is used, can be false (default), anonymous or use-credentials // Default: false
@ -1672,12 +1677,6 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
* post_processors?: array<string, array<string, mixed>>, * post_processors?: array<string, array<string, mixed>>,
* }, * },
* } * }
* @psalm-type DamaDoctrineTestConfig = array{
* enable_static_connection?: mixed, // Default: true
* enable_static_meta_data_cache?: bool, // Default: true
* enable_static_query_cache?: bool, // Default: true
* connection_keys?: list<mixed>,
* }
* @psalm-type TwigExtraConfig = array{ * @psalm-type TwigExtraConfig = array{
* cache?: bool|array{ * cache?: bool|array{
* enabled?: bool, // Default: false * enabled?: bool, // Default: false
@ -2373,6 +2372,13 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
* invalidate_on_env_change?: bool, // Default: true * invalidate_on_env_change?: bool, // Default: true
* }, * },
* } * }
* @psalm-type JbtronicsTranslationEditorConfig = array{
* translations_path?: scalar|null, // Default: "%translator.default_path%"
* format?: scalar|null, // Default: "xlf"
* xliff_version?: scalar|null, // Default: "2.0"
* use_intl_icu_format?: bool, // Default: false
* writer_options?: list<scalar|null>,
* }
* @psalm-type ApiPlatformConfig = array{ * @psalm-type ApiPlatformConfig = array{
* title?: scalar|null, // The title of the API. // Default: "" * title?: scalar|null, // The title of the API. // Default: ""
* description?: scalar|null, // The description of the API. // Default: "" * description?: scalar|null, // The description of the API. // Default: ""
@ -2628,17 +2634,11 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
* ...<mixed> * ...<mixed>
* }, * },
* } * }
* @psalm-type MakerConfig = array{ * @psalm-type DamaDoctrineTestConfig = array{
* root_namespace?: scalar|null, // Default: "App" * enable_static_connection?: mixed, // Default: true
* generate_final_classes?: bool, // Default: true * enable_static_meta_data_cache?: bool, // Default: true
* generate_final_entities?: bool, // Default: false * enable_static_query_cache?: bool, // Default: true
* } * connection_keys?: list<mixed>,
* @psalm-type JbtronicsTranslationEditorConfig = array{
* translations_path?: scalar|null, // Default: "%translator.default_path%"
* format?: scalar|null, // Default: "xlf"
* xliff_version?: scalar|null, // Default: "2.0"
* use_intl_icu_format?: bool, // Default: false
* writer_options?: list<scalar|null>,
* } * }
* @psalm-type ConfigType = array{ * @psalm-type ConfigType = array{
* imports?: ImportsConfig, * imports?: ImportsConfig,

View file

@ -1,3 +1,12 @@
# yaml-language-server: $schema=../vendor/symfony/routing/Loader/schema/routing.schema.json
# This file is the entry point to configure the routes of your app.
# Methods with the #[Route] attribute are automatically imported.
# See also https://symfony.com/doc/current/routing.html
# To list all registered routes, run the following command:
# bin/console debug:router
# Redirect every url without an locale to the locale of the user/the global base locale # Redirect every url without an locale to the locale of the user/the global base locale
scan_qr: scan_qr:
@ -16,4 +25,4 @@ redirector:
url: ".*" url: ".*"
controller: App\Controller\RedirectController::addLocalePart controller: App\Controller\RedirectController::addLocalePart
# Dont match localized routes (no redirection loop, if no root with that name exists) or API prefixed routes # Dont match localized routes (no redirection loop, if no root with that name exists) or API prefixed routes
condition: "not (request.getPathInfo() matches '/^\\\\/([a-z]{2}(_[A-Z]{2})?|api)\\\\//')" condition: "not (request.getPathInfo() matches '/^\\\\/([a-z]{2}(_[A-Z]{2})?|api)\\\\//')"

View file

@ -611,12 +611,12 @@
] ]
}, },
"symfony/routing": { "symfony/routing": {
"version": "7.3", "version": "7.4",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "main",
"version": "7.0", "version": "7.4",
"ref": "21b72649d5622d8f7da329ffb5afb232a023619d" "ref": "bc94c4fd86f393f3ab3947c18b830ea343e51ded"
}, },
"files": [ "files": [
"config/packages/routing.yaml", "config/packages/routing.yaml",