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-08-31 #106

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

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

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

github-actions[bot] commented 2 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-106/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/pull-106/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req '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.

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..af9c12c 100644 --- a/symfony/validator/5.3/config/packages/validator.php +++ b/symfony/validator/7.0/config/packages/validator.php @@ -5,16 +5,8 @@ declare(strict_types=1); use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; return static function (ContainerConfigurator $containerConfigurator): void { - $containerConfigurator->extension('framework', [ - 'validation' => [ - 'email_validation_mode' => 'html5', - ], - ]); + $containerConfigurator->extension('framework', ['validation' => null]); if ($containerConfigurator->env() === 'test') { - $containerConfigurator->extension('framework', [ - 'validation' => [ - 'not_compromised_password' => false, - ], - ]); + $containerConfigurator->extension('framework', ['validation' => ['not_compromised_password' => false]]); } }; 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" } } ```