Fixed deprecation warning from DotEnv component.

This commit is contained in:
Jan Böhmer 2019-11-08 22:37:16 +01:00
parent a0c3410db6
commit 0663a00df8

View file

@ -33,7 +33,7 @@ if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) {
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} else { } else {
// load all the .env files // load all the .env files
(new Dotenv())->loadEnv(dirname(__DIR__).'/.env'); (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
} }
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';