mirror of
https://github.com/symfony/recipes.git
synced 2026-09-18 10:36:43 +03:00
Get rid of config/bootstrap.php for 5.1 apps
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user