@@ -16,17 +16,17 @@ class Kernel extends BaseKernel
16
16
17
17
public function getCacheDir ()
18
18
{
19
- return dirname ( __DIR__ ).'/var/cache/ ' .$ this ->environment ;
19
+ return $ this -> getProjectDir ( ).'/var/cache/ ' .$ this ->environment ;
20
20
}
21
21
22
22
public function getLogDir ()
23
23
{
24
- return dirname ( __DIR__ ).'/var/log ' ;
24
+ return $ this -> getProjectDir ( ).'/var/log ' ;
25
25
}
26
26
27
27
public function registerBundles ()
28
28
{
29
- $ contents = require dirname ( __DIR__ ).'/config/bundles.php ' ;
29
+ $ contents = require $ this -> getProjectDir ( ).'/config/bundles.php ' ;
30
30
foreach ($ contents as $ class => $ envs ) {
31
31
if (isset ($ envs ['all ' ]) || isset ($ envs [$ this ->environment ])) {
32
32
yield new $ class ();
@@ -37,7 +37,7 @@ public function registerBundles()
37
37
protected function configureContainer (ContainerBuilder $ container , LoaderInterface $ loader )
38
38
{
39
39
$ container ->setParameter ('container.autowiring.strict_mode ' , true );
40
- $ confDir = dirname ( __DIR__ ).'/config ' ;
40
+ $ confDir = $ this -> getProjectDir ( ).'/config ' ;
41
41
$ loader ->load ($ confDir .'/packages/* ' .self ::CONFIG_EXTS , 'glob ' );
42
42
if (is_dir ($ confDir .'/packages/ ' .$ this ->environment )) {
43
43
$ loader ->load ($ confDir .'/packages/ ' .$ this ->environment .'/**/* ' .self ::CONFIG_EXTS , 'glob ' );
@@ -48,7 +48,7 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
48
48
49
49
protected function configureRoutes (RouteCollectionBuilder $ routes )
50
50
{
51
- $ confDir = dirname ( __DIR__ ).'/config ' ;
51
+ $ confDir = $ this -> getProjectDir ( ).'/config ' ;
52
52
if (is_dir ($ confDir .'/routes/ ' )) {
53
53
$ routes ->import ($ confDir .'/routes/* ' .self ::CONFIG_EXTS , '/ ' , 'glob ' );
54
54
}
0 commit comments