Remove Symfony 3 compatibility code.
This commit is contained in:
parent
5cc4623aad
commit
b9ca866bdd
@ -179,7 +179,7 @@ class Request
|
||||
protected $format;
|
||||
|
||||
/**
|
||||
* @var SessionInterface
|
||||
* @var SessionInterface|callable
|
||||
*/
|
||||
protected $session;
|
||||
|
||||
|
@ -55,12 +55,8 @@ abstract class AbstractSessionListener implements EventSubscriberInterface
|
||||
|
||||
$session = null;
|
||||
$request = $event->getRequest();
|
||||
if ($request->hasSession()) {
|
||||
// no-op
|
||||
} elseif (method_exists($request, 'setSessionFactory')) {
|
||||
if (!$request->hasSession()) {
|
||||
$request->setSessionFactory(function () { return $this->getSession(); });
|
||||
} elseif ($session = $this->getSession()) {
|
||||
$request->setSession($session);
|
||||
}
|
||||
|
||||
$session = $session ?? ($this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null);
|
||||
|
Reference in New Issue
Block a user