File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
symfony/framework-bundle/5.1/src Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,10 @@ protected function configureContainer(ContainerConfigurator $container): void
16
16
$ container ->import ('../config/{packages}/*.yaml ' );
17
17
$ container ->import ('../config/{packages}/ ' .$ this ->environment .'/*.yaml ' );
18
18
19
- if (file_exists (\dirname (__DIR__ ).'/config/services.yaml ' )) {
19
+ if (is_file (\dirname (__DIR__ ).'/config/services.yaml ' )) {
20
20
$ container ->import ('../config/{services}.yaml ' );
21
21
$ 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 ' )) {
24
23
(require $ path )($ container ->withPath ($ path ), $ this );
25
24
}
26
25
}
@@ -30,10 +29,9 @@ protected function configureRoutes(RoutingConfigurator $routes): void
30
29
$ routes ->import ('../config/{routes}/ ' .$ this ->environment .'/*.yaml ' );
31
30
$ routes ->import ('../config/{routes}/*.yaml ' );
32
31
33
- if (file_exists (\dirname (__DIR__ ).'/config/routes.yaml ' )) {
32
+ if (is_file (\dirname (__DIR__ ).'/config/routes.yaml ' )) {
34
33
$ routes ->import ('../config/{routes}.yaml ' );
35
- } else {
36
- $ path = \dirname (__DIR__ ).'/config/routes.php ' ;
34
+ } elseif (is_file ($ path = \dirname (__DIR__ ).'/config/routes.php ' )) {
37
35
(require $ path )($ routes ->withPath ($ path ), $ this );
38
36
}
39
37
}
You can’t perform that action at this time.
0 commit comments