Skip to content

Commit

Permalink
Require bootstrap.php if exists
Browse files Browse the repository at this point in the history
to load all necessary .env files
  • Loading branch information
Gintautas Miselis committed Feb 13, 2020
1 parent 7533877 commit cb0fcde
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Codeception/Module/Symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ public function _initialize()
}

$this->kernel = new $this->kernelClass($this->config['environment'], $this->config['debug']);

$bootstrapFile = $this->kernel->getProjectDir() . '/config/bootstrap.php';
if (file_exists($bootstrapFile)) {
$_ENV['APP_ENV'] = $this->config['environment'];
require $bootstrapFile;
}

$this->kernel->boot();

if ($this->config['cache_router'] === true) {
Expand Down

0 comments on commit cb0fcde

Please sign in to comment.