Skip to content

Commit fd2c22a

Browse files
author
Alexey Shapilov
committed
Loading Laravel Kernel (to load environment variables from file) before reading the application configuration from config/app.php
1 parent bd2c604 commit fd2c22a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Codeception/Lib/Connector/Laravel5.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ private function initialize($request = null)
192192

193193
$this->app = $this->kernel = $this->loadApplication();
194194

195+
$this->app->make('Illuminate\Contracts\Http\Kernel')->bootstrap();
196+
195197
// Set the request instance for the application,
196198
if (is_null($request)) {
197199
$appConfig = require $this->module->config['project_dir'] . 'config/app.php';
@@ -208,8 +210,6 @@ private function initialize($request = null)
208210
});
209211
}
210212

211-
$this->app->make('Illuminate\Contracts\Http\Kernel')->bootstrap();
212-
213213
// Record all triggered events by adding a wildcard event listener
214214
// Since Laravel 5.4 wildcard event handlers receive the event name as the first argument,
215215
// but for earlier Laravel versions the firing() method of the event dispatcher should be used

0 commit comments

Comments
 (0)