From 1e6124f366deea0f63aae6aa1d60c2b0dcb3afc0 Mon Sep 17 00:00:00 2001 From: Ueli Banholzer Date: Thu, 1 Dec 2022 20:38:48 +0100 Subject: [PATCH] Remove check if APP_ENV is given to load dotenv (#186) otherwise default values of .env is not loaded --- src/Bootstraps/Symfony.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bootstraps/Symfony.php b/src/Bootstraps/Symfony.php index 944391c..b44cd9a 100644 --- a/src/Bootstraps/Symfony.php +++ b/src/Bootstraps/Symfony.php @@ -54,7 +54,7 @@ public function getApplication() } // environment loading as of Symfony 3.3 - if (!getenv('APP_ENV') && class_exists(Dotenv::class) && file_exists(realpath('.env'))) { + if (class_exists(Dotenv::class) && file_exists(realpath('.env'))) { //Symfony >=5.1 compatibility if (method_exists(Dotenv::class, 'usePutenv')) { (new Dotenv())->usePutenv()->bootEnv(realpath('.env'));