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-02-16 #79

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

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

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

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

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/routing:^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/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" } } ```