Skip to content

Commit 1e6124f

Browse files
authored
Remove check if APP_ENV is given to load dotenv (#186)
otherwise default values of .env is not loaded
1 parent 3640c0e commit 1e6124f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/Bootstraps/Symfony.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function getApplication()
5454
}
5555

5656
// environment loading as of Symfony 3.3
57-
if (!getenv('APP_ENV') && class_exists(Dotenv::class) && file_exists(realpath('.env'))) {
57+
if (class_exists(Dotenv::class) && file_exists(realpath('.env'))) {
5858
//Symfony >=5.1 compatibility
5959
if (method_exists(Dotenv::class, 'usePutenv')) {
6060
(new Dotenv())->usePutenv()->bootEnv(realpath('.env'));

0 commit comments

Comments
 (0)