From 5fa5d361537ebc97eff62aa3ab7e547bba53feb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morel?= Date: Fri, 5 Jun 2020 10:07:10 -0700 Subject: [PATCH] Provides a way to override cache and log folders form the ENV --- .../FrameworkBundle/Kernel/MicroKernelTrait.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php index 540c97672c..5e47c38522 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -63,6 +63,22 @@ trait MicroKernelTrait */ //abstract protected function configureContainer(ContainerConfigurator $c): void; + /** + * {@inheritdoc} + */ + public function getCacheDir(): string + { + return $_SERVER['APP_CACHE_DIR'] ?? parent::getCacheDir(); + } + + /** + * {@inheritdoc} + */ + public function getLogDir(): string + { + return $_SERVER['APP_LOG_DIR'] ?? parent::getLogDir(); + } + /** * {@inheritdoc} */