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 authored and Gustavo Nieves committed Mar 12, 2024
1 parent 666c35c commit cd61f6a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Codeception/Module/Symfony.php
Expand Up @@ -202,6 +202,13 @@ public function _initialize(): void
}

$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 cd61f6a

Please sign in to comment.