Skip to content

Commit

Permalink
Merge pull request barryvdh#584 from martindilling/martindilling/upda…
Browse files Browse the repository at this point in the history
…te-for-5.4

[5.4] The HttpDriver gets a SessionManager instead of Session\Store, so instanceof check didn't work
  • Loading branch information
barryvdh authored Jan 7, 2017
2 parents b551206 + 6382fe5 commit 2f59ddf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SymfonyHttpDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class SymfonyHttpDriver implements HttpDriverInterface
{
/** @var \Symfony\Component\HttpFoundation\Session\Session|\Illuminate\Contracts\Session\Session */
/** @var \Symfony\Component\HttpFoundation\Session\Session|\Illuminate\Contracts\Session\Session|\Illuminate\Session\SessionManager */
protected $session;
/** @var \Symfony\Component\HttpFoundation\Response */
protected $response;
Expand Down Expand Up @@ -51,7 +51,7 @@ public function setSessionValue($name, $value)
// In Laravel 5.4 the session changed to use their own custom implementation
// instead of the one from Symfony. One of the changes was the set method
// that was changed to put. Here we check if we are using the new one.
if ($this->session instanceof \Illuminate\Contracts\Session\Session) {
if (method_exists($this->session, 'driver') && $this->session->driver() instanceof \Illuminate\Contracts\Session\Session) {
$this->session->put($name, $value);
return;
}
Expand Down

0 comments on commit 2f59ddf

Please sign in to comment.