Skip to content

Commit cb0fcde

Browse files
author
Gintautas Miselis
committed
Require bootstrap.php if exists
to load all necessary .env files
1 parent 7533877 commit cb0fcde

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
@@ -172,6 +172,13 @@ public function _initialize()
172172
}
173173

174174
$this->kernel = new $this->kernelClass($this->config['environment'], $this->config['debug']);
175+
176+
$bootstrapFile = $this->kernel->getProjectDir() . '/config/bootstrap.php';
177+
if (file_exists($bootstrapFile)) {
178+
$_ENV['APP_ENV'] = $this->config['environment'];
179+
require $bootstrapFile;
180+
}
181+
175182
$this->kernel->boot();
176183

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

0 commit comments

Comments
 (0)