[FrameworkBundle] removed the auto-starting of the session when a previous session exists (it is not needed anymore as the session is now always started on demand)
This commit is contained in:
parent
efb44640d1
commit
2e356c1ab9
@ -44,20 +44,12 @@ class SessionListener implements EventSubscriberInterface
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->container->has('session')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = $event->getRequest();
|
$request = $event->getRequest();
|
||||||
if ($request->hasSession()) {
|
if (!$this->container->has('session') || $request->hasSession()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$request->setSession($session = $this->container->get('session'));
|
$request->setSession($this->container->get('session'));
|
||||||
|
|
||||||
if ($request->hasPreviousSession()) {
|
|
||||||
$session->start();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function getSubscribedEvents()
|
static public function getSubscribedEvents()
|
||||||
|
Reference in New Issue
Block a user