Get rid of config/bootstrap.php for 5.1 apps

This commit is contained in:
Nicolas Grekas
2020-01-29 16:53:59 +01:00
parent 990f591216
commit a0cb2ea41f
45 changed files with 132 additions and 46 deletions
@@ -1,4 +1,11 @@
<?php
use Symfony\Component\Dotenv\Dotenv;
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = 'test');
require dirname(__DIR__, 2).'/config/bootstrap.php';
if (file_exists(dirname(__DIR__, 2).'/config/bootstrap.php')) {
require dirname(__DIR__, 2).'/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__, 2).'/.env');
}