Skip to content

Commit 2f59ddf

Browse files
authored
Merge pull request barryvdh#584 from martindilling/martindilling/update-for-5.4
[5.4] The HttpDriver gets a SessionManager instead of Session\Store, so instanceof check didn't work
2 parents b551206 + 6382fe5 commit 2f59ddf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SymfonyHttpDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class SymfonyHttpDriver implements HttpDriverInterface
1313
{
14-
/** @var \Symfony\Component\HttpFoundation\Session\Session|\Illuminate\Contracts\Session\Session */
14+
/** @var \Symfony\Component\HttpFoundation\Session\Session|\Illuminate\Contracts\Session\Session|\Illuminate\Session\SessionManager */
1515
protected $session;
1616
/** @var \Symfony\Component\HttpFoundation\Response */
1717
protected $response;
@@ -51,7 +51,7 @@ public function setSessionValue($name, $value)
5151
// In Laravel 5.4 the session changed to use their own custom implementation
5252
// instead of the one from Symfony. One of the changes was the set method
5353
// that was changed to put. Here we check if we are using the new one.
54-
if ($this->session instanceof \Illuminate\Contracts\Session\Session) {
54+
if (method_exists($this->session, 'driver') && $this->session->driver() instanceof \Illuminate\Contracts\Session\Session) {
5555
$this->session->put($name, $value);
5656
return;
5757
}

0 commit comments

Comments
 (0)