From ae90ab5b24461ac446c07a82a205a8cb1457d56f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 3 Jun 2021 15:15:03 +0200 Subject: [PATCH] [framework-bundle/5.3] fix importing services/routes.php --- symfony/framework-bundle/5.3/src/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/symfony/framework-bundle/5.3/src/Kernel.php b/symfony/framework-bundle/5.3/src/Kernel.php index 655e7966..8e96873a 100644 --- a/symfony/framework-bundle/5.3/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'); } } }