Skip to content

Commit

Permalink
Remove check if APP_ENV is given to load dotenv (#186)
Browse files Browse the repository at this point in the history
otherwise default values of .env is not loaded
  • Loading branch information
xarem authored Dec 1, 2022
1 parent 3640c0e commit 1e6124f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bootstraps/Symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 1e6124f

Please sign in to comment.