Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update recipes 2024-11-22 #123

Conversation

symfony-php-recipes-bot
Copy link
Member

Q A
License MIT

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

Copy link

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

    composer req symfony/flex
    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
4.0 vs 4.2
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 @@
+<?php
+
+declare(strict_types=1);
+
+use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
+
+return static function (ContainerConfigurator $containerConfigurator): void {
+    $containerConfigurator->extension('framework', [
+        'router' => [
+            'utf8' => true,
+        ],
+    ]);
+};
4.2 vs 5.1
5.1 vs 5.3
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 @@
-<?php
-
-declare(strict_types=1);
-
-use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
-
-return static function (ContainerConfigurator $containerConfigurator): void {
-    $containerConfigurator->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..4125024 100644
--- a/symfony/routing/5.1/config/packages/routing.php
+++ b/symfony/routing/5.3/config/packages/routing.php
@@ -5,9 +5,8 @@ declare(strict_types=1);
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
 
 return static function (ContainerConfigurator $containerConfigurator): void {
-    $containerConfigurator->extension('framework', [
-        'router' => [
-            'utf8' => true,
-        ],
-    ]);
+    $containerConfigurator->extension('framework', ['router' => ['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 --git a/symfony/routing/5.3/config/packages/routing.php b/symfony/routing/6.0/config/packages/routing.php
index 4125024..c965886 100644
--- a/symfony/routing/5.3/config/packages/routing.php
+++ b/symfony/routing/6.0/config/packages/routing.php
@@ -5,8 +5,16 @@ declare(strict_types=1);
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
 
 return static function (ContainerConfigurator $containerConfigurator): void {
-    $containerConfigurator->extension('framework', ['router' => ['utf8' => true]]);
+    $containerConfigurator->extension('framework', [
+        'router' => [
+            'utf8' => true,
+        ],
+    ]);
     if ($containerConfigurator->env() === 'prod') {
-        $containerConfigurator->extension('framework', ['router' => ['strict_requirements' => null]]);
+        $containerConfigurator->extension('framework', [
+            'router' => [
+                'strict_requirements' => null,
+            ],
+        ]);
     }
 };
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 @@
+<?php
+
+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');
+};
6.0 vs 6.1
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 --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 --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"
     }
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant