From d9d398cbb4a379192e008803c190c6d1fdbfd04f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 23 Aug 2023 12:47:55 +0200 Subject: [PATCH] [framework-bundle] Remove options that match the defaults in 7.0 --- .../7.0/config/packages/framework.yaml | 11 ++--------- symfony/routing/7.0/config/packages/routing.yaml | 10 ++++++++++ symfony/routing/7.0/config/routes.yaml | 5 +++++ symfony/routing/7.0/manifest.json | 9 +++++++++ symfony/uid/7.0/manifest.json | 5 +++++ symfony/validator/7.0/config/packages/validator.yaml | 11 +++++++++++ symfony/validator/7.0/manifest.json | 9 +++++++++ 7 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 symfony/routing/7.0/config/packages/routing.yaml create mode 100644 symfony/routing/7.0/config/routes.yaml create mode 100644 symfony/routing/7.0/manifest.json create mode 100644 symfony/uid/7.0/manifest.json create mode 100644 symfony/validator/7.0/config/packages/validator.yaml create mode 100644 symfony/validator/7.0/manifest.json diff --git a/symfony/framework-bundle/7.0/config/packages/framework.yaml b/symfony/framework-bundle/7.0/config/packages/framework.yaml index 355bd4ce2..877eb25d1 100644 --- a/symfony/framework-bundle/7.0/config/packages/framework.yaml +++ b/symfony/framework-bundle/7.0/config/packages/framework.yaml @@ -2,19 +2,12 @@ framework: secret: '%env(APP_SECRET)%' #csrf_protection: true - handle_all_throwables: true - # Enables session support. Note that the session will ONLY be started if you read or write from it. - # Remove or comment this section to explicitly disable session support. - session: - handler_id: null - cookie_secure: auto - cookie_samesite: lax + # Note that the session will be started ONLY if you read or write from it. + session: true #esi: true #fragments: true - php_errors: - log: true when@test: framework: diff --git a/symfony/routing/7.0/config/packages/routing.yaml b/symfony/routing/7.0/config/packages/routing.yaml new file mode 100644 index 000000000..8166181c6 --- /dev/null +++ b/symfony/routing/7.0/config/packages/routing.yaml @@ -0,0 +1,10 @@ +framework: + router: + # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. + # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands + #default_uri: http://localhost + +when@prod: + framework: + router: + strict_requirements: null diff --git a/symfony/routing/7.0/config/routes.yaml b/symfony/routing/7.0/config/routes.yaml new file mode 100644 index 000000000..41ef8140b --- /dev/null +++ b/symfony/routing/7.0/config/routes.yaml @@ -0,0 +1,5 @@ +controllers: + resource: + path: ../src/Controller/ + namespace: App\Controller + type: attribute diff --git a/symfony/routing/7.0/manifest.json b/symfony/routing/7.0/manifest.json new file mode 100644 index 000000000..fd4536e6d --- /dev/null +++ b/symfony/routing/7.0/manifest.json @@ -0,0 +1,9 @@ +{ + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "aliases": ["router"], + "conflict": { + "symfony/framework-bundle": "<7.0" + } +} diff --git a/symfony/uid/7.0/manifest.json b/symfony/uid/7.0/manifest.json new file mode 100644 index 000000000..5ecb16753 --- /dev/null +++ b/symfony/uid/7.0/manifest.json @@ -0,0 +1,5 @@ +{ + "conflict": { + "symfony/framework-bundle": "<7.0" + } +} diff --git a/symfony/validator/7.0/config/packages/validator.yaml b/symfony/validator/7.0/config/packages/validator.yaml new file mode 100644 index 000000000..dd47a6ad8 --- /dev/null +++ b/symfony/validator/7.0/config/packages/validator.yaml @@ -0,0 +1,11 @@ +framework: + validation: + # Enables validator auto-mapping support. + # For instance, basic validation constraints will be inferred from Doctrine's metadata. + #auto_mapping: + # App\Entity\: [] + +when@test: + framework: + validation: + not_compromised_password: false diff --git a/symfony/validator/7.0/manifest.json b/symfony/validator/7.0/manifest.json new file mode 100644 index 000000000..8a204c0c0 --- /dev/null +++ b/symfony/validator/7.0/manifest.json @@ -0,0 +1,9 @@ +{ + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "aliases": ["validation"], + "conflict": { + "symfony/framework-bundle": "<7.0" + } +}