[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:
Fabien Potencier 2012-06-30 20:44:16 +02:00
parent efb44640d1
commit 2e356c1ab9

View File

@ -44,20 +44,12 @@ class SessionListener implements EventSubscriberInterface
return;
}
if (!$this->container->has('session')) {
return;
}
$request = $event->getRequest();
if ($request->hasSession()) {
if (!$this->container->has('session') || $request->hasSession()) {
return;
}
$request->setSession($session = $this->container->get('session'));
if ($request->hasPreviousSession()) {
$session->start();
}
$request->setSession($this->container->get('session'));
}
static public function getSubscribedEvents()