From 06b793f59e32ce691043ed14ff74a690cb3f09ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morel?= Date: Thu, 11 Jun 2020 12:22:59 -0700 Subject: [PATCH] Ensure a split per environment --- .../Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php index 8f23134a06..67d2d188fd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -68,7 +68,11 @@ trait MicroKernelTrait */ public function getCacheDir(): string { - return $_SERVER['APP_CACHE_DIR'] ?? parent::getCacheDir(); + if (isset($_SERVER['APP_CACHE_DIR'])) { + return $_SERVER['APP_CACHE_DIR'].'/'.$this->environment; + } + + return parent::getCacheDir(); } /**