Skip to content

Commit cd61f6a

Browse files
Gintautas Miselisgnievesj
Gintautas Miselis
authored andcommitted
Require bootstrap.php if exists
to load all necessary .env files
1 parent 666c35c commit cd61f6a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Codeception/Module/Symfony.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ public function _initialize(): void
202202
}
203203

204204
$this->kernel = new $this->kernelClass($this->config['environment'], $this->config['debug']);
205+
206+
$bootstrapFile = $this->kernel->getProjectDir() . '/config/bootstrap.php';
207+
if (file_exists($bootstrapFile)) {
208+
$_ENV['APP_ENV'] = $this->config['environment'];
209+
require $bootstrapFile;
210+
}
211+
205212
$this->kernel->boot();
206213

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

0 commit comments

Comments
 (0)