schranz-php-recipes / symfony-recipes-php

Provides https://github.com/symfony/recipes as PHP instead of YAML configs.
MIT License
13 stars 3 forks source link

Update recipes 2024-01-18 #74

Closed symfony-php-recipes-bot closed 9 months ago

symfony-php-recipes-bot commented 9 months ago
Q A
License MIT

The Symfony Recipes changed with version . This PR contains the new definition for recipes.

github-actions[bot] commented 9 months ago

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/pull-74/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/pull-74/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'doctrine/doctrine-bundle:^2.10' 'symfony/asset-mapper:^6.4' 'symfony/crowdin-translation-provider:^5.3' 'symfony/framework-bundle:^7.0' 'symfony/loco-translation-provider:^5.3' 'symfony/lokalise-translation-provider:^5.3' 'symfony/mailer:^4.3' 'symfony/monolog-bundle:^3.7' 'symfony/phrase-translation-provider:^6.4' 'symfony/resend-mailer:^7.1' 'symfony/routing:^7.0' 'symfony/translation:^6.3' 'symfony/uid:^7.0' 'symfony/validator:^7.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. I'm going keep this comment up to date with any updates of the attached patch.

doctrine/doctrine-bundle

1.6 vs 1.12 ```diff diff --git a/doctrine/doctrine-bundle/1.6/config/packages/doctrine.php b/doctrine/doctrine-bundle/1.12/config/packages/doctrine.php index c93732f..aa66d26 100644 --- a/doctrine/doctrine-bundle/1.6/config/packages/doctrine.php +++ b/doctrine/doctrine-bundle/1.12/config/packages/doctrine.php @@ -15,7 +15,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { ], 'orm' => [ 'auto_generate_proxy_classes' => true, - 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore', + 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', 'auto_mapping' => true, 'mappings' => [ 'App' => [ diff --git a/doctrine/doctrine-bundle/1.6/config/packages/prod/doctrine.php b/doctrine/doctrine-bundle/1.12/config/packages/prod/doctrine.php index a6dfabd..dd81ae3 100644 --- a/doctrine/doctrine-bundle/1.6/config/packages/prod/doctrine.php +++ b/doctrine/doctrine-bundle/1.12/config/packages/prod/doctrine.php @@ -3,37 +3,26 @@ declare(strict_types=1); use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -use function Symfony\Component\DependencyInjection\Loader\Configurator\service; return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('doctrine', [ 'orm' => [ 'auto_generate_proxy_classes' => false, 'metadata_cache_driver' => [ - 'type' => 'service', - 'id' => 'doctrine.system_cache_provider', + 'type' => 'pool', + 'pool' => 'doctrine.system_cache_pool', ], 'query_cache_driver' => [ - 'type' => 'service', - 'id' => 'doctrine.system_cache_provider', + 'type' => 'pool', + 'pool' => 'doctrine.system_cache_pool', ], 'result_cache_driver' => [ - 'type' => 'service', - 'id' => 'doctrine.result_cache_provider', + 'type' => 'pool', + 'pool' => 'doctrine.result_cache_pool', ], ], ]); - $services = $containerConfigurator->services(); - - $services->set('doctrine.result_cache_provider', 'Symfony\Component\Cache\DoctrineProvider') - ->private() - ->args([service('doctrine.result_cache_pool')]); - - $services->set('doctrine.system_cache_provider', 'Symfony\Component\Cache\DoctrineProvider') - ->private() - ->args([service('doctrine.system_cache_pool')]); - $containerConfigurator->extension('framework', [ 'cache' => [ 'pools' => [ diff --git a/doctrine/doctrine-bundle/1.6/manifest.json b/doctrine/doctrine-bundle/1.12/manifest.json index 04da3d1..2d3a40a 100644 --- a/doctrine/doctrine-bundle/1.6/manifest.json +++ b/doctrine/doctrine-bundle/1.12/manifest.json @@ -11,8 +11,8 @@ "#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml", "#3": "", "#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"", - "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8\"", - "DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" + "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/db_name?serverVersion=8\"", + "DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/db_name?serverVersion=16&charset=utf8" }, "dockerfile": [ "RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev && \\", ```
1.12 vs 2.0 ```diff diff --git a/doctrine/doctrine-bundle/1.12/config/packages/doctrine.php b/doctrine/doctrine-bundle/2.0/config/packages/doctrine.php index aa66d26..e210ec1 100644 --- a/doctrine/doctrine-bundle/1.12/config/packages/doctrine.php +++ b/doctrine/doctrine-bundle/2.0/config/packages/doctrine.php @@ -8,10 +8,6 @@ return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('doctrine', [ 'dbal' => [ 'url' => '%env(resolve:DATABASE_URL)%', - 'charset' => 'utf8mb4', - 'default_table_options' => [ - 'collate' => 'utf8mb4_unicode_ci', - ], ], 'orm' => [ 'auto_generate_proxy_classes' => true, diff --git a/doctrine/doctrine-bundle/1.12/manifest.json b/doctrine/doctrine-bundle/2.0/manifest.json index 2d3a40a..04da3d1 100644 --- a/doctrine/doctrine-bundle/1.12/manifest.json +++ b/doctrine/doctrine-bundle/2.0/manifest.json @@ -11,8 +11,8 @@ "#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml", "#3": "", "#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"", - "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/db_name?serverVersion=8\"", - "DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/db_name?serverVersion=16&charset=utf8" + "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8\"", + "DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" }, "dockerfile": [ "RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev && \\", ```
2.0 vs 2.3 ```diff diff --git a/doctrine/doctrine-bundle/2.0/config/packages/prod/doctrine.php b/doctrine/doctrine-bundle/2.3/config/packages/prod/doctrine.php index dd81ae3..20e0bf6 100644 --- a/doctrine/doctrine-bundle/2.0/config/packages/prod/doctrine.php +++ b/doctrine/doctrine-bundle/2.3/config/packages/prod/doctrine.php @@ -8,10 +8,6 @@ return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('doctrine', [ 'orm' => [ 'auto_generate_proxy_classes' => false, - 'metadata_cache_driver' => [ - 'type' => 'pool', - 'pool' => 'doctrine.system_cache_pool', - ], 'query_cache_driver' => [ 'type' => 'pool', 'pool' => 'doctrine.system_cache_pool', diff --git a/doctrine/doctrine-bundle/2.3/config/packages/test/doctrine.php b/doctrine/doctrine-bundle/2.3/config/packages/test/doctrine.php new file mode 100644 index 0000000..d1f2212 --- /dev/null +++ b/doctrine/doctrine-bundle/2.3/config/packages/test/doctrine.php @@ -0,0 +1,13 @@ +extension('doctrine', [ + 'dbal' => [ + 'dbname' => 'main_test%env(default::TEST_TOKEN)%', + ], + ]); +}; diff --git a/doctrine/doctrine-bundle/2.0/manifest.json b/doctrine/doctrine-bundle/2.3/manifest.json index 04da3d1..26e52b9 100644 --- a/doctrine/doctrine-bundle/2.0/manifest.json +++ b/doctrine/doctrine-bundle/2.3/manifest.json @@ -11,13 +11,13 @@ "#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml", "#3": "", "#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"", - "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8\"", + "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4\"", "DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" }, "dockerfile": [ - "RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev && \\", - "\tdocker-php-ext-install -j$(nproc) pdo_pgsql && \\", - "\tapk add --no-cache --virtual .pgsql-rundeps so:libpq.so.5 && \\", + "RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev; \\", + "\tdocker-php-ext-install -j$(nproc) pdo_pgsql; \\", + "\tapk add --no-cache --virtual .pgsql-rundeps so:libpq.so.5; \\", "\tapk del .pgsql-deps" ], "docker-compose": { ```
2.3 vs 2.4 ```diff diff --git a/doctrine/doctrine-bundle/2.3/config/packages/doctrine.php b/doctrine/doctrine-bundle/2.4/config/packages/doctrine.php index e210ec1..401ce10 100644 --- a/doctrine/doctrine-bundle/2.3/config/packages/doctrine.php +++ b/doctrine/doctrine-bundle/2.4/config/packages/doctrine.php @@ -16,7 +16,6 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'mappings' => [ 'App' => [ 'is_bundle' => false, - 'type' => 'annotation', 'dir' => '%kernel.project_dir%/src/Entity', 'prefix' => 'App\Entity', 'alias' => 'App', @@ -24,4 +23,39 @@ return static function (ContainerConfigurator $containerConfigurator): void { ], ], ]); + if ($containerConfigurator->env() === 'test') { + $containerConfigurator->extension('doctrine', [ + 'dbal' => [ + 'dbname_suffix' => '_test%env(default::TEST_TOKEN)%', + ], + ]); + } + if ($containerConfigurator->env() === 'prod') { + $containerConfigurator->extension('doctrine', [ + 'orm' => [ + 'auto_generate_proxy_classes' => false, + 'proxy_dir' => '%kernel.build_dir%/doctrine/orm/Proxies', + 'query_cache_driver' => [ + 'type' => 'pool', + 'pool' => 'doctrine.system_cache_pool', + ], + 'result_cache_driver' => [ + 'type' => 'pool', + 'pool' => 'doctrine.result_cache_pool', + ], + ], + ]); + $containerConfigurator->extension('framework', [ + 'cache' => [ + 'pools' => [ + 'doctrine.result_cache_pool' => [ + 'adapter' => 'cache.app', + ], + 'doctrine.system_cache_pool' => [ + 'adapter' => 'cache.system', + ], + ], + ], + ]); + } }; diff --git a/doctrine/doctrine-bundle/2.3/config/packages/prod/doctrine.php b/doctrine/doctrine-bundle/2.3/config/packages/prod/doctrine.php deleted file mode 100644 index 20e0bf6..0000000 --- a/doctrine/doctrine-bundle/2.3/config/packages/prod/doctrine.php +++ /dev/null @@ -1,34 +0,0 @@ -extension('doctrine', [ - 'orm' => [ - 'auto_generate_proxy_classes' => false, - 'query_cache_driver' => [ - 'type' => 'pool', - 'pool' => 'doctrine.system_cache_pool', - ], - 'result_cache_driver' => [ - 'type' => 'pool', - 'pool' => 'doctrine.result_cache_pool', - ], - ], - ]); - - $containerConfigurator->extension('framework', [ - 'cache' => [ - 'pools' => [ - 'doctrine.result_cache_pool' => [ - 'adapter' => 'cache.app', - ], - 'doctrine.system_cache_pool' => [ - 'adapter' => 'cache.system', - ], - ], - ], - ]); -}; diff --git a/doctrine/doctrine-bundle/2.3/config/packages/test/doctrine.php b/doctrine/doctrine-bundle/2.3/config/packages/test/doctrine.php deleted file mode 100644 index d1f2212..0000000 --- a/doctrine/doctrine-bundle/2.3/config/packages/test/doctrine.php +++ /dev/null @@ -1,13 +0,0 @@ -extension('doctrine', [ - 'dbal' => [ - 'dbname' => 'main_test%env(default::TEST_TOKEN)%', - ], - ]); -}; diff --git a/doctrine/doctrine-bundle/2.3/manifest.json b/doctrine/doctrine-bundle/2.4/manifest.json index 26e52b9..88bac7a 100644 --- a/doctrine/doctrine-bundle/2.3/manifest.json +++ b/doctrine/doctrine-bundle/2.4/manifest.json @@ -44,5 +44,8 @@ " - \"5432\"" ] } + }, + "conflict": { + "symfony/framework-bundle": "<5.3" } } ```
2.4 vs 2.8 ```diff diff --git a/doctrine/doctrine-bundle/2.4/config/packages/doctrine.php b/doctrine/doctrine-bundle/2.8/config/packages/doctrine.php index 401ce10..d625cfa 100644 --- a/doctrine/doctrine-bundle/2.4/config/packages/doctrine.php +++ b/doctrine/doctrine-bundle/2.8/config/packages/doctrine.php @@ -11,6 +11,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { ], 'orm' => [ 'auto_generate_proxy_classes' => true, + 'enable_lazy_ghost_objects' => true, 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', 'auto_mapping' => true, 'mappings' => [ diff --git a/doctrine/doctrine-bundle/2.4/manifest.json b/doctrine/doctrine-bundle/2.8/manifest.json index 88bac7a..addfd20 100644 --- a/doctrine/doctrine-bundle/2.4/manifest.json +++ b/doctrine/doctrine-bundle/2.8/manifest.json @@ -11,12 +11,13 @@ "#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml", "#3": "", "#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"", - "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4\"", + "#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4\"", + "#6": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4\"", "DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" }, "dockerfile": [ "RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev; \\", - "\tdocker-php-ext-install -j$(nproc) pdo_pgsql; \\", + "\tdocker-php-ext-install -j\"$(nproc)\" pdo_pgsql; \\", "\tapk add --no-cache --virtual .pgsql-rundeps so:libpq.so.5; \\", "\tapk del .pgsql-deps" ], @@ -46,6 +47,8 @@ } }, "conflict": { + "doctrine/orm": "<2.14", + "symfony/dependency-injection": "<6.2", "symfony/framework-bundle": "<5.3" } } ```
2.8 vs 2.9 ```diff diff --git a/doctrine/doctrine-bundle/2.8/manifest.json b/doctrine/doctrine-bundle/2.9/manifest.json index addfd20..1d8996a 100644 --- a/doctrine/doctrine-bundle/2.8/manifest.json +++ b/doctrine/doctrine-bundle/2.9/manifest.json @@ -16,10 +16,7 @@ "DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" }, "dockerfile": [ - "RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev; \\", - "\tdocker-php-ext-install -j\"$(nproc)\" pdo_pgsql; \\", - "\tapk add --no-cache --virtual .pgsql-rundeps so:libpq.so.5; \\", - "\tapk del .pgsql-deps" + "RUN install-php-extensions pdo_pgsql" ], "docker-compose": { "docker-compose.yml": { ```
2.9 vs 2.10 ```diff diff --git a/doctrine/doctrine-bundle/2.9/config/packages/doctrine.php b/doctrine/doctrine-bundle/2.10/config/packages/doctrine.php index d625cfa..b821418 100644 --- a/doctrine/doctrine-bundle/2.9/config/packages/doctrine.php +++ b/doctrine/doctrine-bundle/2.10/config/packages/doctrine.php @@ -8,14 +8,18 @@ return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('doctrine', [ 'dbal' => [ 'url' => '%env(resolve:DATABASE_URL)%', + 'profiling_collect_backtrace' => '%kernel.debug%', ], 'orm' => [ 'auto_generate_proxy_classes' => true, 'enable_lazy_ghost_objects' => true, + 'report_fields_where_declared' => true, + 'validate_xml_mapping' => true, 'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware', 'auto_mapping' => true, 'mappings' => [ 'App' => [ + 'type' => 'attribute', 'is_bundle' => false, 'dir' => '%kernel.project_dir%/src/Entity', 'prefix' => 'App\Entity', ```

symfony/asset-mapper

6.3 vs 6.4 ```diff diff --git a/symfony/asset-mapper/6.3/assets/app.js b/symfony/asset-mapper/6.4/assets/app.js index cb0082a..6174cc6 100644 --- a/symfony/asset-mapper/6.3/assets/app.js +++ b/symfony/asset-mapper/6.4/assets/app.js @@ -4,4 +4,6 @@ * This file will be included onto the page via the importmap() Twig function, * which should already be in your base.html.twig. */ -console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉') +import './styles/app.css'; + +console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉'); diff --git a/symfony/asset-mapper/6.3/importmap.php b/symfony/asset-mapper/6.4/importmap.php index 5c2c21d..7e330f7 100644 --- a/symfony/asset-mapper/6.3/importmap.php +++ b/symfony/asset-mapper/6.4/importmap.php @@ -1,13 +1,13 @@ [ - 'path' => 'app.js', - 'preload' => true, + 'path' => './assets/app.js', + 'entrypoint' => true, ], ]; diff --git a/symfony/asset-mapper/6.3/manifest.json b/symfony/asset-mapper/6.4/manifest.json index c6fb477..cebb7e6 100644 --- a/symfony/asset-mapper/6.3/manifest.json +++ b/symfony/asset-mapper/6.4/manifest.json @@ -6,22 +6,19 @@ }, "aliases": ["asset-mapper", "importmap"], "gitignore": [ - "/%PUBLIC_DIR%/assets/" + "/%PUBLIC_DIR%/assets/", + "/assets/vendor/" ], + "composer-scripts": { + "importmap:install": "symfony-cmd" + }, "add-lines": [ { "file": "templates/base.html.twig", - "content": " {{ importmap() }}", + "content": "{% block importmap %}{{ importmap('app') }}{% endblock %}", "position": "after_target", "target": "{% block javascripts %}", "warn_if_missing": true - }, - { - "file": "templates/base.html.twig", - "content": " ", - "position": "after_target", - "target": "{% block stylesheets %}", - "warn_if_missing": true } ], "conflict": { ```

symfony/framework-bundle

3.3 vs 3.4 ```diff diff --git a/symfony/framework-bundle/3.3/config/packages/framework.php b/symfony/framework-bundle/3.4/config/packages/framework.php index 53429e9..a20aeaa 100644 --- a/symfony/framework-bundle/3.3/config/packages/framework.php +++ b/symfony/framework-bundle/3.4/config/packages/framework.php @@ -9,6 +9,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'secret' => '%env(APP_SECRET)%', 'session' => [ 'handler_id' => null, + 'cookie_samesite' => 'lax', ], 'php_errors' => [ 'log' => true, ```
3.4 vs 4.2 ```diff diff --git a/symfony/framework-bundle/3.4/config/bootstrap.php b/symfony/framework-bundle/4.2/config/bootstrap.php index 703da0d..55560fb 100644 --- a/symfony/framework-bundle/3.4/config/bootstrap.php +++ b/symfony/framework-bundle/4.2/config/bootstrap.php @@ -13,40 +13,8 @@ if (!class_exists(Dotenv::class)) { if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) { (new Dotenv(false))->populate($env); } else { - $path = dirname(__DIR__).'/.env'; - $dotenv = new Dotenv(false); - // load all the .env files - if (method_exists($dotenv, 'loadEnv')) { - $dotenv->loadEnv($path); - } else { - // fallback code in case your Dotenv component is not 4.2 or higher (when loadEnv() was added) - - if (file_exists($path) || !file_exists($p = "$path.dist")) { - $dotenv->load($path); - } else { - $dotenv->load($p); - } - - if (null === $env = $_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) { - $dotenv->populate([ - 'APP_ENV' => $env = 'dev', - ]); - } - - if ('test' !== $env && file_exists($p = "$path.local")) { - $dotenv->load($p); - $env = $_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env; - } - - if (file_exists($p = "$path.$env")) { - $dotenv->load($p); - } - - if (file_exists($p = "$path.$env.local")) { - $dotenv->load($p); - } - } + (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env'); } $_SERVER += $_ENV; diff --git a/symfony/framework-bundle/3.4/config/packages/framework.php b/symfony/framework-bundle/4.2/config/packages/framework.php index a20aeaa..1144bb7 100644 --- a/symfony/framework-bundle/3.4/config/packages/framework.php +++ b/symfony/framework-bundle/4.2/config/packages/framework.php @@ -9,6 +9,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'secret' => '%env(APP_SECRET)%', 'session' => [ 'handler_id' => null, + 'cookie_secure' => 'auto', 'cookie_samesite' => 'lax', ], 'php_errors' => [ diff --git a/symfony/framework-bundle/3.4/config/services.php b/symfony/framework-bundle/4.2/config/services.php index 664e93a..fc4d7d9 100644 --- a/symfony/framework-bundle/3.4/config/services.php +++ b/symfony/framework-bundle/4.2/config/services.php @@ -12,7 +12,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { ->autoconfigure(); $services->load('App\\', __DIR__.'/../src/*') - ->exclude([__DIR__.'/../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}']); + ->exclude([__DIR__.'/../src/{DependencyInjection,Entity,Kernel.php}']); $services->load('App\Controller\\', __DIR__.'/../src/Controller') ->tag('controller.service_arguments'); diff --git a/symfony/framework-bundle/3.4/manifest.json b/symfony/framework-bundle/4.2/manifest.json index aa0150e..101b2aa 100644 --- a/symfony/framework-bundle/3.4/manifest.json +++ b/symfony/framework-bundle/4.2/manifest.json @@ -14,13 +14,14 @@ "env": { "APP_ENV": "dev", "APP_SECRET": "%generate(secret)%", - "#TRUSTED_PROXIES": "127.0.0.1,127.0.0.2", + "#TRUSTED_PROXIES": "127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16", "#TRUSTED_HOSTS": "'^(localhost|example\\.com)$'" }, "gitignore": [ "/.env.local", "/.env.local.php", "/.env.*.local", + "/%CONFIG_DIR%/secrets/prod/prod.decrypt.private.php", "/%PUBLIC_DIR%/bundles/", "/%VAR_DIR%/", "/vendor/" diff --git a/symfony/framework-bundle/3.4/post-install.txt b/symfony/framework-bundle/4.2/post-install.txt index 944aa06..12f3669 100644 --- a/symfony/framework-bundle/3.4/post-install.txt +++ b/symfony/framework-bundle/4.2/post-install.txt @@ -1,7 +1,6 @@ * Run your application: 1. Go to the project directory 2. Create your code repository with the git init command - 3. Download the Symfony CLI at https://symfony.com/download to install a development web server, - or run composer require server --dev for a minimalist one + 3. Download the Symfony CLI at https://symfony.com/download to install a development web server * Read the documentation at https://symfony.com/doc diff --git a/symfony/framework-bundle/3.4/src/Kernel.php b/symfony/framework-bundle/4.2/src/Kernel.php index 68b7a56..1cd0572 100644 --- a/symfony/framework-bundle/3.4/src/Kernel.php +++ b/symfony/framework-bundle/4.2/src/Kernel.php @@ -13,19 +13,9 @@ class Kernel extends BaseKernel { use MicroKernelTrait; - const CONFIG_EXTS = '.{php,xml,yaml,yml}'; + private const CONFIG_EXTS = '.{php,xml,yaml,yml}'; - public function getCacheDir() - { - return $this->getProjectDir().'/var/cache/'.$this->environment; - } - - public function getLogDir() - { - return $this->getProjectDir().'/var/log'; - } - - public function registerBundles() + public function registerBundles(): iterable { $contents = require $this->getProjectDir().'/config/bundles.php'; foreach ($contents as $class => $envs) { @@ -35,13 +25,16 @@ class Kernel extends BaseKernel } } - protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader) + public function getProjectDir(): string + { + return \dirname(__DIR__); + } + + protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void { $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); - // Feel free to remove the "container.autowiring.strict_mode" parameter - // if you are using symfony/dependency-injection 4.0+ as it's the default behavior - $container->setParameter('container.autowiring.strict_mode', true); - $container->setParameter('container.dumper.inline_class_loader', true); + $container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug); + $container->setParameter('container.dumper.inline_factories', true); $confDir = $this->getProjectDir().'/config'; $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); @@ -50,7 +43,7 @@ class Kernel extends BaseKernel $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); } - protected function configureRoutes(RouteCollectionBuilder $routes) + protected function configureRoutes(RouteCollectionBuilder $routes): void { $confDir = $this->getProjectDir().'/config'; ```
4.2 vs 4.4 ```diff diff --git a/symfony/framework-bundle/4.4/config/preload.php b/symfony/framework-bundle/4.4/config/preload.php new file mode 100644 index 0000000..064bdcd --- /dev/null +++ b/symfony/framework-bundle/4.4/config/preload.php @@ -0,0 +1,9 @@ +import('@FrameworkBundle/Resources/config/routing/errors.xml') + ->prefix('/_error'); +}; diff --git a/symfony/framework-bundle/4.2/config/services.php b/symfony/framework-bundle/4.4/config/services.php index fc4d7d9..f842509 100644 --- a/symfony/framework-bundle/4.2/config/services.php +++ b/symfony/framework-bundle/4.4/config/services.php @@ -11,9 +11,9 @@ return static function (ContainerConfigurator $containerConfigurator): void { ->autowire() ->autoconfigure(); - $services->load('App\\', __DIR__.'/../src/*') - ->exclude([__DIR__.'/../src/{DependencyInjection,Entity,Kernel.php}']); + $services->load('App\\', __DIR__.'/../src/') + ->exclude([__DIR__.'/../src/DependencyInjection/', __DIR__.'/../src/Entity/', __DIR__.'/../src/Kernel.php']); - $services->load('App\Controller\\', __DIR__.'/../src/Controller') + $services->load('App\Controller\\', __DIR__.'/../src/Controller/') ->tag('controller.service_arguments'); }; diff --git a/symfony/framework-bundle/4.2/public/index.php b/symfony/framework-bundle/4.4/public/index.php index 929197c..d0b6e02 100644 --- a/symfony/framework-bundle/4.2/public/index.php +++ b/symfony/framework-bundle/4.4/public/index.php @@ -1,7 +1,7 @@
4.4 vs 5.1 ```diff diff --git a/symfony/framework-bundle/4.4/config/bootstrap.php b/symfony/framework-bundle/4.4/config/bootstrap.php deleted file mode 100644 index 55560fb..0000000 --- a/symfony/framework-bundle/4.4/config/bootstrap.php +++ /dev/null @@ -1,23 +0,0 @@ -=1.2) -if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) { - (new Dotenv(false))->populate($env); -} else { - // load all the .env files - (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env'); -} - -$_SERVER += $_ENV; -$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; -$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; -$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; diff --git a/symfony/framework-bundle/4.4/config/preload.php b/symfony/framework-bundle/5.1/config/preload.php index 064bdcd..5ebcdb2 100644 --- a/symfony/framework-bundle/4.4/config/preload.php +++ b/symfony/framework-bundle/5.1/config/preload.php @@ -1,9 +1,5 @@ bootEnv(dirname(__DIR__).'/.env'); if ($_SERVER['APP_DEBUG']) { umask(0000); diff --git a/symfony/framework-bundle/4.4/src/Kernel.php b/symfony/framework-bundle/5.1/src/Kernel.php index 1cd0572..655e796 100644 --- a/symfony/framework-bundle/4.4/src/Kernel.php +++ b/symfony/framework-bundle/5.1/src/Kernel.php @@ -3,52 +3,36 @@ namespace App; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\HttpKernel\Kernel as BaseKernel; -use Symfony\Component\Routing\RouteCollectionBuilder; +use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; class Kernel extends BaseKernel { use MicroKernelTrait; - private const CONFIG_EXTS = '.{php,xml,yaml,yml}'; - - public function registerBundles(): iterable + protected function configureContainer(ContainerConfigurator $container): void { - $contents = require $this->getProjectDir().'/config/bundles.php'; - foreach ($contents as $class => $envs) { - if ($envs[$this->environment] ?? $envs['all'] ?? false) { - yield new $class(); - } + $container->import('../config/{packages}/*.yaml'); + $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); + + if (is_file(\dirname(__DIR__).'/config/services.yaml')) { + $container->import('../config/services.yaml'); + $container->import('../config/{services}_'.$this->environment.'.yaml'); + } elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) { + (require $path)($container->withPath($path), $this); } } - public function getProjectDir(): string + protected function configureRoutes(RoutingConfigurator $routes): void { - return \dirname(__DIR__); - } + $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); + $routes->import('../config/{routes}/*.yaml'); - protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void - { - $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); - $container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || $this->debug); - $container->setParameter('container.dumper.inline_factories', true); - $confDir = $this->getProjectDir().'/config'; - - $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); - $loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob'); - $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); - $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); - } - - protected function configureRoutes(RouteCollectionBuilder $routes): void - { - $confDir = $this->getProjectDir().'/config'; - - $routes->import($confDir.'/{routes}/'.$this->environment.'/*'.self::CONFIG_EXTS, '/', 'glob'); - $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); - $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); + if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { + $routes->import('../config/routes.yaml'); + } elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) { + (require $path)($routes->withPath($path), $this); + } } } ```
5.1 vs 5.2 ```diff diff --git a/symfony/framework-bundle/5.1/manifest.json b/symfony/framework-bundle/5.2/manifest.json index 101b2aa..17fa50a 100644 --- a/symfony/framework-bundle/5.1/manifest.json +++ b/symfony/framework-bundle/5.2/manifest.json @@ -13,9 +13,7 @@ }, "env": { "APP_ENV": "dev", - "APP_SECRET": "%generate(secret)%", - "#TRUSTED_PROXIES": "127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16", - "#TRUSTED_HOSTS": "'^(localhost|example\\.com)$'" + "APP_SECRET": "%generate(secret)%" }, "gitignore": [ "/.env.local", diff --git a/symfony/framework-bundle/5.1/public/index.php b/symfony/framework-bundle/5.2/public/index.php index 097baa3..3bcee0b 100644 --- a/symfony/framework-bundle/5.1/public/index.php +++ b/symfony/framework-bundle/5.2/public/index.php @@ -15,14 +15,6 @@ if ($_SERVER['APP_DEBUG']) { Debug::enable(); } -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { - Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO); -} - -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { - Request::setTrustedHosts([$trustedHosts]); -} - $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); $request = Request::createFromGlobals(); $response = $kernel->handle($request); ```
5.2 vs 5.3 ```diff diff --git a/symfony/framework-bundle/5.2/config/packages/framework.php b/symfony/framework-bundle/5.3/config/packages/framework.php index 1144bb7..47144ff 100644 --- a/symfony/framework-bundle/5.2/config/packages/framework.php +++ b/symfony/framework-bundle/5.3/config/packages/framework.php @@ -7,13 +7,23 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('framework', [ 'secret' => '%env(APP_SECRET)%', + 'http_method_override' => false, 'session' => [ 'handler_id' => null, 'cookie_secure' => 'auto', 'cookie_samesite' => 'lax', + 'storage_factory_id' => 'session.storage.factory.native', ], 'php_errors' => [ 'log' => true, ], ]); + if ($containerConfigurator->env() === 'test') { + $containerConfigurator->extension('framework', [ + 'test' => true, + 'session' => [ + 'storage_factory_id' => 'session.storage.factory.mock_file', + ], + ]); + } }; diff --git a/symfony/framework-bundle/5.2/config/packages/test/framework.php b/symfony/framework-bundle/5.2/config/packages/test/framework.php deleted file mode 100644 index 38e7b54..0000000 --- a/symfony/framework-bundle/5.2/config/packages/test/framework.php +++ /dev/null @@ -1,14 +0,0 @@ -extension('framework', [ - 'test' => true, - 'session' => [ - 'storage_id' => 'session.storage.mock_file', - ], - ]); -}; diff --git a/symfony/framework-bundle/5.2/config/routes/dev/framework.php b/symfony/framework-bundle/5.3/config/routes/framework.php similarity index 50% rename from symfony/framework-bundle/5.2/config/routes/dev/framework.php rename to symfony/framework-bundle/5.3/config/routes/framework.php index 1b47b2e..92bf8c3 100644 --- a/symfony/framework-bundle/5.2/config/routes/dev/framework.php +++ b/symfony/framework-bundle/5.3/config/routes/framework.php @@ -5,6 +5,8 @@ declare(strict_types=1); use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return static function (RoutingConfigurator $routingConfigurator): void { - $routingConfigurator->import('@FrameworkBundle/Resources/config/routing/errors.xml') - ->prefix('/_error'); + if ($routingConfigurator->env() === 'dev') { + $routingConfigurator->import('@FrameworkBundle/Resources/config/routing/errors.xml') + ->prefix('/_error'); + } }; diff --git a/symfony/framework-bundle/5.2/config/services.php b/symfony/framework-bundle/5.3/config/services.php index f842509..5cea39f 100644 --- a/symfony/framework-bundle/5.2/config/services.php +++ b/symfony/framework-bundle/5.3/config/services.php @@ -13,7 +13,4 @@ return static function (ContainerConfigurator $containerConfigurator): void { $services->load('App\\', __DIR__.'/../src/') ->exclude([__DIR__.'/../src/DependencyInjection/', __DIR__.'/../src/Entity/', __DIR__.'/../src/Kernel.php']); - - $services->load('App\Controller\\', __DIR__.'/../src/Controller/') - ->tag('controller.service_arguments'); }; diff --git a/symfony/framework-bundle/5.2/public/index.php b/symfony/framework-bundle/5.3/public/index.php index 3bcee0b..9982c21 100644 --- a/symfony/framework-bundle/5.2/public/index.php +++ b/symfony/framework-bundle/5.3/public/index.php @@ -1,22 +1,9 @@ bootEnv(dirname(__DIR__).'/.env'); - -if ($_SERVER['APP_DEBUG']) { - umask(0000); - - Debug::enable(); -} - -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); -$request = Request::createFromGlobals(); -$response = $kernel->handle($request); -$response->send(); -$kernel->terminate($request, $response); +return function (array $context) { + return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); +}; diff --git a/symfony/framework-bundle/5.2/src/Kernel.php b/symfony/framework-bundle/5.3/src/Kernel.php index 655e796..8e96873 100644 --- a/symfony/framework-bundle/5.2/src/Kernel.php +++ b/symfony/framework-bundle/5.3/src/Kernel.php @@ -19,8 +19,8 @@ class Kernel extends BaseKernel if (is_file(\dirname(__DIR__).'/config/services.yaml')) { $container->import('../config/services.yaml'); $container->import('../config/{services}_'.$this->environment.'.yaml'); - } elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) { - (require $path)($container->withPath($path), $this); + } else { + $container->import('../config/{services}.php'); } } @@ -31,8 +31,8 @@ class Kernel extends BaseKernel if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { $routes->import('../config/routes.yaml'); - } elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) { - (require $path)($routes->withPath($path), $this); + } else { + $routes->import('../config/{routes}.php'); } } } ```
5.3 vs 5.4 ```diff diff --git a/symfony/framework-bundle/5.3/src/Kernel.php b/symfony/framework-bundle/5.4/src/Kernel.php index 8e96873..779cd1f 100644 --- a/symfony/framework-bundle/5.3/src/Kernel.php +++ b/symfony/framework-bundle/5.4/src/Kernel.php @@ -3,36 +3,9 @@ namespace App; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\HttpKernel\Kernel as BaseKernel; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; class Kernel extends BaseKernel { use MicroKernelTrait; - - protected function configureContainer(ContainerConfigurator $container): void - { - $container->import('../config/{packages}/*.yaml'); - $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); - - if (is_file(\dirname(__DIR__).'/config/services.yaml')) { - $container->import('../config/services.yaml'); - $container->import('../config/{services}_'.$this->environment.'.yaml'); - } else { - $container->import('../config/{services}.php'); - } - } - - protected function configureRoutes(RoutingConfigurator $routes): void - { - $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); - $routes->import('../config/{routes}/*.yaml'); - - if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { - $routes->import('../config/routes.yaml'); - } else { - $routes->import('../config/{routes}.php'); - } - } } ```
5.4 vs 6.2 ```diff diff --git a/symfony/framework-bundle/5.4/config/packages/framework.php b/symfony/framework-bundle/6.2/config/packages/framework.php index 47144ff..6b582de 100644 --- a/symfony/framework-bundle/5.4/config/packages/framework.php +++ b/symfony/framework-bundle/6.2/config/packages/framework.php @@ -8,6 +8,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('framework', [ 'secret' => '%env(APP_SECRET)%', 'http_method_override' => false, + 'handle_all_throwables' => true, 'session' => [ 'handler_id' => null, 'cookie_secure' => 'auto', ```
6.2 vs 6.4 ```diff diff --git a/symfony/framework-bundle/6.2/config/packages/framework.php b/symfony/framework-bundle/6.4/config/packages/framework.php index 6b582de..537b566 100644 --- a/symfony/framework-bundle/6.2/config/packages/framework.php +++ b/symfony/framework-bundle/6.4/config/packages/framework.php @@ -7,13 +7,13 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('framework', [ 'secret' => '%env(APP_SECRET)%', + 'annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'session' => [ 'handler_id' => null, 'cookie_secure' => 'auto', 'cookie_samesite' => 'lax', - 'storage_factory_id' => 'session.storage.factory.native', ], 'php_errors' => [ 'log' => true, ```
6.4 vs 7.0 ```diff diff --git a/symfony/framework-bundle/6.4/config/packages/framework.php b/symfony/framework-bundle/7.0/config/packages/framework.php index 537b566..1fbad34 100644 --- a/symfony/framework-bundle/6.4/config/packages/framework.php +++ b/symfony/framework-bundle/7.0/config/packages/framework.php @@ -7,17 +7,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('framework', [ 'secret' => '%env(APP_SECRET)%', - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'session' => [ - 'handler_id' => null, - 'cookie_secure' => 'auto', - 'cookie_samesite' => 'lax', - ], - 'php_errors' => [ - 'log' => true, - ], + 'session' => true, ]); if ($containerConfigurator->env() === 'test') { $containerConfigurator->extension('framework', [ ```

symfony/monolog-bundle

3.1 vs 3.3 ```diff diff --git a/symfony/monolog-bundle/3.1/config/packages/prod/monolog.php b/symfony/monolog-bundle/3.3/config/packages/prod/monolog.php index c9949ff..d369a43 100644 --- a/symfony/monolog-bundle/3.1/config/packages/prod/monolog.php +++ b/symfony/monolog-bundle/3.3/config/packages/prod/monolog.php @@ -11,8 +11,8 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'type' => 'fingers_crossed', 'action_level' => 'error', 'handler' => 'nested', + 'excluded_http_codes' => [404, 405], 'buffer_size' => 50, - 'excluded_404s' => ['^/'], ], 'nested' => [ 'type' => 'stream', diff --git a/symfony/monolog-bundle/3.1/config/packages/test/monolog.php b/symfony/monolog-bundle/3.3/config/packages/test/monolog.php index 5b8b32b..88060f8 100644 --- a/symfony/monolog-bundle/3.1/config/packages/test/monolog.php +++ b/symfony/monolog-bundle/3.3/config/packages/test/monolog.php @@ -8,10 +8,16 @@ return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('monolog', [ 'handlers' => [ 'main' => [ + 'type' => 'fingers_crossed', + 'action_level' => 'error', + 'handler' => 'nested', + 'excluded_http_codes' => [404, 405], + 'channels' => ['!event'], + ], + 'nested' => [ 'type' => 'stream', 'path' => '%kernel.logs_dir%/%kernel.environment%.log', 'level' => 'debug', - 'channels' => ['!event'], ], ], ]); ```
3.3 vs 3.7 ```diff diff --git a/symfony/monolog-bundle/3.3/config/packages/dev/monolog.php b/symfony/monolog-bundle/3.3/config/packages/dev/monolog.php deleted file mode 100644 index 7435558..0000000 --- a/symfony/monolog-bundle/3.3/config/packages/dev/monolog.php +++ /dev/null @@ -1,23 +0,0 @@ -extension('monolog', [ - 'handlers' => [ - 'main' => [ - 'type' => 'stream', - 'path' => '%kernel.logs_dir%/%kernel.environment%.log', - 'level' => 'debug', - 'channels' => ['!event'], - ], - 'console' => [ - 'type' => 'console', - 'process_psr_3_messages' => false, - 'channels' => ['!event', '!doctrine', '!console'], - ], - ], - ]); -}; diff --git a/symfony/monolog-bundle/3.7/config/packages/monolog.php b/symfony/monolog-bundle/3.7/config/packages/monolog.php new file mode 100644 index 0000000..3507815 --- /dev/null +++ b/symfony/monolog-bundle/3.7/config/packages/monolog.php @@ -0,0 +1,76 @@ +extension('monolog', [ + 'channels' => ['deprecation'], + ]); + if ($containerConfigurator->env() === 'dev') { + $containerConfigurator->extension('monolog', [ + 'handlers' => [ + 'main' => [ + 'type' => 'stream', + 'path' => '%kernel.logs_dir%/%kernel.environment%.log', + 'level' => 'debug', + 'channels' => ['!event'], + ], + 'console' => [ + 'type' => 'console', + 'process_psr_3_messages' => false, + 'channels' => ['!event', '!doctrine', '!console'], + ], + ], + ]); + } + if ($containerConfigurator->env() === 'test') { + $containerConfigurator->extension('monolog', [ + 'handlers' => [ + 'main' => [ + 'type' => 'fingers_crossed', + 'action_level' => 'error', + 'handler' => 'nested', + 'excluded_http_codes' => [404, 405], + 'channels' => ['!event'], + ], + 'nested' => [ + 'type' => 'stream', + 'path' => '%kernel.logs_dir%/%kernel.environment%.log', + 'level' => 'debug', + ], + ], + ]); + } + if ($containerConfigurator->env() === 'prod') { + $containerConfigurator->extension('monolog', [ + 'handlers' => [ + 'main' => [ + 'type' => 'fingers_crossed', + 'action_level' => 'error', + 'handler' => 'nested', + 'excluded_http_codes' => [404, 405], + 'buffer_size' => 50, + ], + 'nested' => [ + 'type' => 'stream', + 'path' => 'php://stderr', + 'level' => 'debug', + 'formatter' => 'monolog.formatter.json', + ], + 'console' => [ + 'type' => 'console', + 'process_psr_3_messages' => false, + 'channels' => ['!event', '!doctrine'], + ], + 'deprecation' => [ + 'type' => 'stream', + 'channels' => ['deprecation'], + 'path' => 'php://stderr', + 'formatter' => 'monolog.formatter.json', + ], + ], + ]); + } +}; diff --git a/symfony/monolog-bundle/3.3/config/packages/prod/deprecations.php b/symfony/monolog-bundle/3.3/config/packages/prod/deprecations.php deleted file mode 100644 index e69de29..0000000 diff --git a/symfony/monolog-bundle/3.3/config/packages/prod/monolog.php b/symfony/monolog-bundle/3.3/config/packages/prod/monolog.php deleted file mode 100644 index d369a43..0000000 --- a/symfony/monolog-bundle/3.3/config/packages/prod/monolog.php +++ /dev/null @@ -1,29 +0,0 @@ -extension('monolog', [ - 'handlers' => [ - 'main' => [ - 'type' => 'fingers_crossed', - 'action_level' => 'error', - 'handler' => 'nested', - 'excluded_http_codes' => [404, 405], - 'buffer_size' => 50, - ], - 'nested' => [ - 'type' => 'stream', - 'path' => '%kernel.logs_dir%/%kernel.environment%.log', - 'level' => 'debug', - ], - 'console' => [ - 'type' => 'console', - 'process_psr_3_messages' => false, - 'channels' => ['!event', '!doctrine'], - ], - ], - ]); -}; diff --git a/symfony/monolog-bundle/3.3/config/packages/test/monolog.php b/symfony/monolog-bundle/3.3/config/packages/test/monolog.php deleted file mode 100644 index 88060f8..0000000 --- a/symfony/monolog-bundle/3.3/config/packages/test/monolog.php +++ /dev/null @@ -1,24 +0,0 @@ -extension('monolog', [ - 'handlers' => [ - 'main' => [ - 'type' => 'fingers_crossed', - 'action_level' => 'error', - 'handler' => 'nested', - 'excluded_http_codes' => [404, 405], - 'channels' => ['!event'], - ], - 'nested' => [ - 'type' => 'stream', - 'path' => '%kernel.logs_dir%/%kernel.environment%.log', - 'level' => 'debug', - ], - ], - ]); -}; diff --git a/symfony/monolog-bundle/3.3/manifest.json b/symfony/monolog-bundle/3.7/manifest.json index 1dc6c69..ed73c59 100644 --- a/symfony/monolog-bundle/3.3/manifest.json +++ b/symfony/monolog-bundle/3.7/manifest.json @@ -5,5 +5,8 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, - "aliases": ["log", "logger", "logging", "logs", "monolog"] + "aliases": ["log", "logger", "logging", "logs", "monolog"], + "conflict": { + "symfony/framework-bundle": "<5.3" + } } ```

symfony/routing

3.3 vs 4.0 ```diff ```
4.0 vs 4.2 ```diff diff --git a/symfony/routing/4.2/config/packages/routing.php b/symfony/routing/4.2/config/packages/routing.php new file mode 100644 index 0000000..6e2d0ec --- /dev/null +++ b/symfony/routing/4.2/config/packages/routing.php @@ -0,0 +1,13 @@ +extension('framework', [ + 'router' => [ + 'utf8' => true, + ], + ]); +}; ```
4.2 vs 5.1 ```diff ```
5.1 vs 5.3 ```diff diff --git a/symfony/routing/5.1/config/packages/prod/routing.php b/symfony/routing/5.1/config/packages/prod/routing.php deleted file mode 100644 index c307544..0000000 --- a/symfony/routing/5.1/config/packages/prod/routing.php +++ /dev/null @@ -1,13 +0,0 @@ -extension('framework', [ - 'router' => [ - 'strict_requirements' => null, - ], - ]); -}; diff --git a/symfony/routing/5.1/config/packages/routing.php b/symfony/routing/5.3/config/packages/routing.php index 6e2d0ec..c965886 100644 --- a/symfony/routing/5.1/config/packages/routing.php +++ b/symfony/routing/5.3/config/packages/routing.php @@ -10,4 +10,11 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'utf8' => true, ], ]); + if ($containerConfigurator->env() === 'prod') { + $containerConfigurator->extension('framework', [ + 'router' => [ + 'strict_requirements' => null, + ], + ]); + } }; diff --git a/symfony/routing/5.1/manifest.json b/symfony/routing/5.3/manifest.json index c0c66b6..a3f340e 100644 --- a/symfony/routing/5.1/manifest.json +++ b/symfony/routing/5.3/manifest.json @@ -2,5 +2,8 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, - "aliases": ["router"] + "aliases": ["router"], + "conflict": { + "symfony/framework-bundle": "<5.3" + } } ```
5.3 vs 6.0 ```diff diff --git a/symfony/routing/5.3/config/routes.php b/symfony/routing/6.0/config/routes.php index e69de29..2db7c30 100644 --- a/symfony/routing/5.3/config/routes.php +++ b/symfony/routing/6.0/config/routes.php @@ -0,0 +1,11 @@ +import('../src/Controller/', 'annotation'); + + $routingConfigurator->import('../src/Kernel.php', 'annotation'); +}; ```
6.0 vs 6.1 ```diff diff --git a/symfony/routing/6.0/config/routes.php b/symfony/routing/6.1/config/routes.php index 2db7c30..7dcefb2 100644 --- a/symfony/routing/6.0/config/routes.php +++ b/symfony/routing/6.1/config/routes.php @@ -5,7 +5,5 @@ declare(strict_types=1); use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return static function (RoutingConfigurator $routingConfigurator): void { - $routingConfigurator->import('../src/Controller/', 'annotation'); - - $routingConfigurator->import('../src/Kernel.php', 'annotation'); + $routingConfigurator->import('../src/Controller/', 'attribute'); }; ```
6.1 vs 6.2 ```diff diff --git a/symfony/routing/6.1/config/routes.php b/symfony/routing/6.2/config/routes.php index 7dcefb2..d3a5ab6 100644 --- a/symfony/routing/6.1/config/routes.php +++ b/symfony/routing/6.2/config/routes.php @@ -5,5 +5,8 @@ declare(strict_types=1); use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return static function (RoutingConfigurator $routingConfigurator): void { - $routingConfigurator->import('../src/Controller/', 'attribute'); + $routingConfigurator->import([ + 'path' => '../src/Controller/', + 'namespace' => 'App\Controller', + ], 'attribute'); }; diff --git a/symfony/routing/6.1/manifest.json b/symfony/routing/6.2/manifest.json index a3f340e..db10260 100644 --- a/symfony/routing/6.1/manifest.json +++ b/symfony/routing/6.2/manifest.json @@ -4,6 +4,6 @@ }, "aliases": ["router"], "conflict": { - "symfony/framework-bundle": "<5.3" + "symfony/framework-bundle": "<6.2" } } ```
6.2 vs 7.0 ```diff diff --git a/symfony/routing/6.2/config/packages/routing.php b/symfony/routing/7.0/config/packages/routing.php index c965886..b1c337b 100644 --- a/symfony/routing/6.2/config/packages/routing.php +++ b/symfony/routing/7.0/config/packages/routing.php @@ -6,9 +6,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('framework', [ - 'router' => [ - 'utf8' => true, - ], + 'router' => null, ]); if ($containerConfigurator->env() === 'prod') { $containerConfigurator->extension('framework', [ diff --git a/symfony/routing/6.2/manifest.json b/symfony/routing/7.0/manifest.json index db10260..fd4536e 100644 --- a/symfony/routing/6.2/manifest.json +++ b/symfony/routing/7.0/manifest.json @@ -4,6 +4,6 @@ }, "aliases": ["router"], "conflict": { - "symfony/framework-bundle": "<6.2" + "symfony/framework-bundle": "<7.0" } } ```

symfony/translation

3.3 vs 5.3 ```diff diff --git a/symfony/translation/3.3/config/packages/translation.php b/symfony/translation/5.3/config/packages/translation.php index 764dbf0..e18a164 100644 --- a/symfony/translation/3.3/config/packages/translation.php +++ b/symfony/translation/5.3/config/packages/translation.php @@ -10,6 +10,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'translator' => [ 'default_path' => '%kernel.project_dir%/translations', 'fallbacks' => ['en'], + 'providers' => null, ], ]); }; ```
5.3 vs 6.3 ```diff ```

symfony/uid

6.2 vs 7.0 ```diff diff --git a/symfony/uid/6.2/config/packages/uid.php b/symfony/uid/6.2/config/packages/uid.php deleted file mode 100644 index 58a8615..0000000 --- a/symfony/uid/6.2/config/packages/uid.php +++ /dev/null @@ -1,14 +0,0 @@ -extension('framework', [ - 'uid' => [ - 'default_uuid_version' => 7, - 'time_based_uuid_version' => 7, - ], - ]); -}; diff --git a/symfony/uid/6.2/manifest.json b/symfony/uid/7.0/manifest.json index 61b9612..5ecb167 100644 --- a/symfony/uid/6.2/manifest.json +++ b/symfony/uid/7.0/manifest.json @@ -1,8 +1,5 @@ { - "copy-from-recipe": { - "config/": "%CONFIG_DIR%/" - }, "conflict": { - "symfony/framework-bundle": "<6.2" + "symfony/framework-bundle": "<7.0" } } ```

symfony/validator

3.3 vs 4.1 ```diff diff --git a/symfony/validator/4.1/config/packages/test/validator.php b/symfony/validator/4.1/config/packages/test/validator.php new file mode 100644 index 0000000..d827a29 --- /dev/null +++ b/symfony/validator/4.1/config/packages/test/validator.php @@ -0,0 +1,11 @@ +extension('framework', [ + 'validation' => null, + ]); +}; diff --git a/symfony/validator/4.1/config/packages/validator.php b/symfony/validator/4.1/config/packages/validator.php new file mode 100644 index 0000000..48a835d --- /dev/null +++ b/symfony/validator/4.1/config/packages/validator.php @@ -0,0 +1,13 @@ +extension('framework', [ + 'validation' => [ + 'email_validation_mode' => 'html5', + ], + ]); +}; diff --git a/symfony/validator/3.3/manifest.json b/symfony/validator/4.1/manifest.json index 2a250e2..57f78dc 100644 --- a/symfony/validator/3.3/manifest.json +++ b/symfony/validator/4.1/manifest.json @@ -1,3 +1,6 @@ { + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, "aliases": ["validation"] } ```
4.1 vs 4.3 ```diff diff --git a/symfony/validator/4.1/config/packages/test/validator.php b/symfony/validator/4.3/config/packages/test/validator.php index d827a29..e21acf8 100644 --- a/symfony/validator/4.1/config/packages/test/validator.php +++ b/symfony/validator/4.3/config/packages/test/validator.php @@ -6,6 +6,8 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('framework', [ - 'validation' => null, + 'validation' => [ + 'not_compromised_password' => false, + ], ]); }; ```
4.3 vs 5.3 ```diff diff --git a/symfony/validator/4.3/config/packages/test/validator.php b/symfony/validator/4.3/config/packages/test/validator.php deleted file mode 100644 index e21acf8..0000000 --- a/symfony/validator/4.3/config/packages/test/validator.php +++ /dev/null @@ -1,13 +0,0 @@ -extension('framework', [ - 'validation' => [ - 'not_compromised_password' => false, - ], - ]); -}; diff --git a/symfony/validator/4.3/config/packages/validator.php b/symfony/validator/5.3/config/packages/validator.php index 48a835d..772f073 100644 --- a/symfony/validator/4.3/config/packages/validator.php +++ b/symfony/validator/5.3/config/packages/validator.php @@ -10,4 +10,11 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'email_validation_mode' => 'html5', ], ]); + if ($containerConfigurator->env() === 'test') { + $containerConfigurator->extension('framework', [ + 'validation' => [ + 'not_compromised_password' => false, + ], + ]); + } }; diff --git a/symfony/validator/4.3/manifest.json b/symfony/validator/5.3/manifest.json index 57f78dc..84521db 100644 --- a/symfony/validator/4.3/manifest.json +++ b/symfony/validator/5.3/manifest.json @@ -2,5 +2,8 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, - "aliases": ["validation"] + "aliases": ["validation"], + "conflict": { + "symfony/framework-bundle": "<5.3" + } } ```
5.3 vs 7.0 ```diff diff --git a/symfony/validator/5.3/config/packages/validator.php b/symfony/validator/7.0/config/packages/validator.php index 772f073..a67d98e 100644 --- a/symfony/validator/5.3/config/packages/validator.php +++ b/symfony/validator/7.0/config/packages/validator.php @@ -6,9 +6,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->extension('framework', [ - 'validation' => [ - 'email_validation_mode' => 'html5', - ], + 'validation' => null, ]); if ($containerConfigurator->env() === 'test') { $containerConfigurator->extension('framework', [ diff --git a/symfony/validator/5.3/manifest.json b/symfony/validator/7.0/manifest.json index 84521db..8a204c0 100644 --- a/symfony/validator/5.3/manifest.json +++ b/symfony/validator/7.0/manifest.json @@ -4,6 +4,6 @@ }, "aliases": ["validation"], "conflict": { - "symfony/framework-bundle": "<5.3" + "symfony/framework-bundle": "<7.0" } } ```