8000 Update getSession usages · laravel/framework@d9b7b25 · GitHub
[go: up one dir, main page]

Skip to content

Commit d9b7b25

Browse files
committed
Update getSession usages
1 parent 86bcb6f commit d9b7b25

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/Illuminate/Http/Request.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use RuntimeException;
1212
use Symfony\Component\HttpFoundation\ParameterBag;
1313
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
14-
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1514

1615
/**
1716
* @method array validate(array $rules, ...$params)
@@ -405,8 +404,8 @@ public static function createFrom(self $from, $to = null)
405404

406405
$request->setJson($from->json());
407406

408-
if ($from->hasSession()) {
409-
$request->setLaravelSession($from->getSession());
407+
if ($from->hasSession() && $session = $from->getSession()) {
408+
$request->setLaravelSession($session);
410409
}
411410

412411
$request->setUserResolver($from->getUserResolver());
@@ -489,16 +488,6 @@ public function session()
489488
return $this->session;
490489
}
491490

492-
/**
493-
* Get the session associated with the request.
494-
*
495-
* @return \Illuminate\Session\Store
496-
*/
497-
public function getSession(): SessionInterface
498-
{
499-
return $this->session;
500-
}
501-
502491
/**
503492
* Set the session instance on the request.
504493
*

0 commit comments

Comments
 (0)
0