diff --git a/symfony/console/3.3/bin/console b/symfony/console/3.3/bin/console index 87cef1583..28a01aa7f 100755 --- a/symfony/console/3.3/bin/console +++ b/symfony/console/3.3/bin/console @@ -17,7 +17,9 @@ if (!class_exists(Application::class)) { } if (!getenv('APP_ENV')) { - (new Dotenv())->load(__DIR__.'/../.env'); + $dotEnv = new Dotenv(); + $dotEnv->populate(['APP_DIR' => dirname(__DIR__)]); + $dotEnv->load(__DIR__.'/../.env'); } $input = new ArgvInput(); diff --git a/symfony/framework-bundle/3.3/public/index.php b/symfony/framework-bundle/3.3/public/index.php index 0870a3a1f..191975e88 100644 --- a/symfony/framework-bundle/3.3/public/index.php +++ b/symfony/framework-bundle/3.3/public/index.php @@ -9,7 +9,9 @@ // The check is to ensure we don't use .env in production if (!getenv('APP_ENV')) { - (new Dotenv())->load(__DIR__.'/../.env'); + $dotEnv = new Dotenv(); + $dotEnv->populate(['APP_DIR' => dirname(__DIR__)]); + $dotEnv->load(__DIR__.'/../.env'); } if (getenv('APP_DEBUG')) {