Skip to content

Commit 5b1159f

Browse files
committed
[FrameworkBundle] Simplify the service and route registration
Bracket are not needed since we can be sure the file exist
1 parent bdf0da8 commit 5b1159f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected function configureContainer(ContainerConfigurator $container): void
1717
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
1818

1919
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
20-
$container->import('../config/{services}.yaml');
20+
$container->import('../config/services.yaml');
2121
$container->import('../config/{services}_'.$this->environment.'.yaml');
2222
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
2323
(require $path)($container->withPath($path), $this);
@@ -30,7 +30,7 @@ protected function configureRoutes(RoutingConfigurator $routes): void
3030
$routes->import('../config/{routes}/*.yaml');
3131

3232
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
33-
$routes->import('../config/{routes}.yaml');
33+
$routes->import('../config/routes.yaml');
3434
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
3535
(require $path)($routes->withPath($path), $this);
3636
}

0 commit comments

Comments
 (0)