@@ -13,26 +13,30 @@ class Kernel extends BaseKernel
13
13
14
14
protected function configureContainer (ContainerConfigurator $ container ): void
15
15
{
16
- $ container ->import ('../config/{packages}/*.yaml ' );
17
- $ container ->import ('../config/{packages}/ ' .$ this ->environment .'/*.yaml ' );
16
+ $ projectDir = $ this ->getProjectDir ();
17
+
18
+ $ container ->import ($ projectDir .'/config/{packages}/*.yaml ' );
19
+ $ container ->import ($ projectDir .'/config/{packages}/ ' .$ this ->environment .'/*.yaml ' );
18
20
19
21
if (is_file (\dirname (__DIR__ ).'/config/services.yaml ' )) {
20
- $ container ->import (' .. /config/services.yaml ' );
21
- $ container ->import (' .. /config/{services}_ ' .$ this ->environment .'.yaml ' );
22
+ $ container ->import ($ projectDir . ' /config/services.yaml ' );
23
+ $ container ->import ($ projectDir . ' /config/{services}_ ' .$ this ->environment .'.yaml ' );
22
24
} else {
23
- $ container ->import (' .. /config/{services}.php ' );
25
+ $ container ->import ($ projectDir . ' /config/{services}.php ' );
24
26
}
25
27
}
26
28
27
29
protected function configureRoutes (RoutingConfigurator $ routes ): void
28
30
{
29
- $ routes ->import ('../config/{routes}/ ' .$ this ->environment .'/*.yaml ' );
30
- $ routes ->import ('../config/{routes}/*.yaml ' );
31
+ $ projectDir = $ this ->getProjectDir ();
32
+
33
+ $ routes ->import ($ projectDir .'/config/{routes}/ ' .$ this ->environment .'/*.yaml ' );
34
+ $ routes ->import ($ projectDir .'/config/{routes}/*.yaml ' );
31
35
32
36
if (is_file (\dirname (__DIR__ ).'/config/routes.yaml ' )) {
33
- $ routes ->import (' .. /config/routes.yaml ' );
37
+ $ routes ->import ($ projectDir . ' /config/routes.yaml ' );
34
38
} else {
35
- $ routes ->import (' .. /config/{routes}.php ' );
39
+ $ routes ->import ($ projectDir . ' /config/{routes}.php ' );
36
40
}
37
41
}
38
42
}
0 commit comments