diff --git a/src/Codeception/Module/Symfony.php b/src/Codeception/Module/Symfony.php index 13a9f6df..5b7d7994 100644 --- a/src/Codeception/Module/Symfony.php +++ b/src/Codeception/Module/Symfony.php @@ -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) {