diff --git a/src/Infrastructure/Symfony/Kernel.php b/src/Infrastructure/Symfony/Kernel.php index 8f13fde..2ba8cb4 100644 --- a/src/Infrastructure/Symfony/Kernel.php +++ b/src/Infrastructure/Symfony/Kernel.php @@ -15,24 +15,24 @@ class Kernel extends BaseKernel const CONFIG_EXTS = '.{php,xml,yaml,yml}'; - public function getRootDir() + public function getProjectDir() { return dirname(__DIR__, 3); } public function getCacheDir(): string { - return $this->getRootDir().'/var/cache/'.$this->environment; + return $this->getProjectDir().'/var/cache/'.$this->environment; } public function getLogDir(): string { - return $this->getRootDir().'/var/log'; + return $this->getProjectDir().'/var/log'; } public function registerBundles() { - $contents = require $this->getRootDir().'/config/bundles.php'; + $contents = require $this->getProjectDir().'/config/bundles.php'; foreach ($contents as $class => $envs) { if (isset($envs['all']) || isset($envs[$this->environment])) { yield new $class(); @@ -42,7 +42,7 @@ public function registerBundles() protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader) { - $confDir = $this->getRootDir().'/config'; + $confDir = $this->getProjectDir().'/config'; $loader->load($confDir.'/packages/*'.self::CONFIG_EXTS, 'glob'); if (is_dir($confDir.'/packages/'.$this->environment)) { $loader->load($confDir.'/packages/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); @@ -53,7 +53,7 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa protected function configureRoutes(RouteCollectionBuilder $routes) { - $confDir = $this->getRootDir().'/config'; + $confDir = $this->getProjectDir().'/config'; if (is_dir($confDir.'/routes/')) { $routes->import($confDir.'/routes/*'.self::CONFIG_EXTS, '/', 'glob'); }