Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9ca866

Browse files
committed
Remove Symfony 3 compatibility code.
1 parent 5cc4623 commit b9ca866

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class Request
179179
protected $format;
180180

181181
/**
182-
* @var SessionInterface
182+
* @var SessionInterface|callable
183183
*/
184184
protected $session;
185185

src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,8 @@ public function onKernelRequest(GetResponseEvent $event)
5555

5656
$session = null;
5757
$request = $event->getRequest();
58-
if ($request->hasSession()) {
59-
// no-op
60-
} elseif (method_exists($request, 'setSessionFactory')) {
58+
if (!$request->hasSession()) {
6159
$request->setSessionFactory(function () { return $this->getSession(); });
62-
} elseif ($session = $this->getSession()) {
63-
$request->setSession($session);
6460
}
6561

6662
$session = $session ?? ($this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null);

0 commit comments

Comments
 (0)