Skip to content

Commit ae90ab5

Browse files
[framework-bundle/5.3] fix importing services/routes.php
1 parent bc4370d commit ae90ab5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

symfony/framework-bundle/5.3/src/Kernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ protected function configureContainer(ContainerConfigurator $container): void
1919
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
2020
$container->import('../config/services.yaml');
2121
$container->import('../config/{services}_'.$this->environment.'.yaml');
22-
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
23-
(require $path)($container->withPath($path), $this);
22+
} else {
23+
$container->import('../config/{services}.php');
2424
}
2525
}
2626

@@ -31,8 +31,8 @@ protected function configureRoutes(RoutingConfigurator $routes): void
3131

3232
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
3333
$routes->import('../config/routes.yaml');
34-
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
35-
(require $path)($routes->withPath($path), $this);
34+
} else {
35+
$routes->import('../config/{routes}.php');
3636
}
3737
}
3838
}

0 commit comments

Comments
 (0)