Skip to content

Commit 55bd2d4

Browse files
author
symfony-flex-server[bot]
authored
Merge pull request #788
2 parents 4442ff3 + 9effb0d commit 55bd2d4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

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

19-
if (file_exists(\dirname(__DIR__).'/config/services.yaml')) {
19+
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
2020
$container->import('../config/{services}.yaml');
2121
$container->import('../config/{services}_'.$this->environment.'.yaml');
22-
} else {
23-
$path = \dirname(__DIR__).'/config/services.php';
22+
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
2423
(require $path)($container->withPath($path), $this);
2524
}
2625
}
@@ -30,10 +29,9 @@ protected function configureRoutes(RoutingConfigurator $routes): void
3029
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
3130
$routes->import('../config/{routes}/*.yaml');
3231

33-
if (file_exists(\dirname(__DIR__).'/config/routes.yaml')) {
32+
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
3433
$routes->import('../config/{routes}.yaml');
35-
} else {
36-
$path = \dirname(__DIR__).'/config/routes.php';
34+
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
3735
(require $path)($routes->withPath($path), $this);
3836
}
3937
}

0 commit comments

Comments
 (0)