Skip to content

Commit

Permalink
Replace getRootDir() with getProjectDir()
Browse files Browse the repository at this point in the history
  • Loading branch information
nicwortel committed Oct 12, 2017
1 parent ae8daab commit b7a0d94
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Infrastructure/Symfony/Kernel.php
Expand Up @@ -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();
Expand All @@ -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');
Expand All @@ -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');
}
Expand Down

0 comments on commit b7a0d94

Please sign in to comment.