Skip to content

Commit

Permalink
Merge pull request Codeception#3735 from janhenkgerritsen/2.2
Browse files Browse the repository at this point in the history
Fix issue with service container bindings in Laravel 5 module
  • Loading branch information
janhenkgerritsen authored Nov 14, 2016
2 parents 3f07fb1 + bef6bd4 commit 807d5b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### 2.2.7

* [Laravel5] Fixed error where custom service container bindings were not available on the first request. See #3728. By @janhenkgerritsen
* [Lumen] Fixed error where a non-existing exception class was thrown. See #3729. By @janhenkgerritsen
* [Phalcon] Added `services` part which can be used to `grabServiceFromContainer` and `addServiceToContainer` when conflicting module is used. By @sergeyklay
* [Phalcon] **Refactored**. Moved in-memory session adapter to the separated namespace. By @sergeyklay
Expand Down
8 changes: 4 additions & 4 deletions src/Codeception/Lib/Connector/Laravel5.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ protected function doRequest($request)
}
$this->firstRequest = false;

$this->applyBindings();
$this->applyContextualBindings();
$this->applyInstances();

$request = Request::createFromBase($request);
$response = $this->kernel->handle($request);
$this->app->make('Illuminate\Contracts\Http\Kernel')->terminate($request, $response);
Expand Down Expand Up @@ -218,10 +222,6 @@ private function initialize($request = null)
Model::unsetEventDispatcher();
}

$this->applyBindings();
$this->applyContextualBindings();
$this->applyInstances();

$this->module->setApplication($this->app);
}

Expand Down

0 comments on commit 807d5b4

Please sign in to comment.