Skip to content

Commit

Permalink
Bring back SYMFONY_TMP_DIR for Docker optimization (#543)
Browse files Browse the repository at this point in the history
But also platform.sh
  • Loading branch information
Plopix authored Jun 22, 2020
1 parent 0ce26dd commit 88a76d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,19 @@ protected function configureRoutes(RouteCollectionBuilder $routes): void
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
}

// can be removed when bumping to Symfony 5.2
public function getCacheDir()
{
if (isset($_SERVER['APP_CACHE_DIR'])) {
return $_SERVER['APP_CACHE_DIR'].'/'.$this->environment;
}
return parent::getCacheDir();
}

// can be removed when bumping to Symfony 5.2
public function getLogDir()
{
return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir();
}
}

0 comments on commit 88a76d9

Please sign in to comment.