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