Fix bootstrap for Symfony 6

This commit is contained in:
Loïc Frémont 2022-06-03 18:02:11 +02:00
parent d3d2073427
commit ee318e562b

View file

@ -15,7 +15,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.');
} else {
// load all the .env files
(new Dotenv(true))->loadEnv(dirname(__DIR__) . '/.env');
(new Dotenv())->loadEnv(dirname(__DIR__) . '/.env');
}
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';