8000 [FrameworkBundle] removed the auto-starting of the session when a pre… · symfony/symfony@2e356c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e356c1

Browse files
committed
[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)
1 parent efb4464 commit 2e356c1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,12 @@ public function onKernelRequest(GetResponseEvent $event)
4444
return;
4545
}
4646

47-
if (!$this->container->has('session')) {
48-
return;
49-
}
50-
5147
$request = $event->getRequest();
52-
if ($request->hasSession()) {
48+
if (!$this->container->has('session') || $request->hasSession()) {
5349
return;
5450
}
5551

56-
$request->setSession($session = $this->container->get('session'));
57-
58-
if ($request->hasPreviousSession()) {
59-
$session->start();
60-
}
52+
$request->setSession($this->container->get('session'));
6153
}
6254

6355
static public function getSubscribedEvents()

0 commit comments

Comments
 (0)
0