File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ class Request
179179 protected $ format ;
180180
181181 /**
182- * @var SessionInterface
182+ * @var SessionInterface|callable
183183 */
184184 protected $ session ;
185185
Original file line number Diff line number Diff line change @@ -55,12 +55,8 @@ public function onKernelRequest(GetResponseEvent $event)
5555
5656 $ session = null ;
5757 $ request = $ event ->getRequest ();
58- if ($ request ->hasSession ()) {
59- // no-op
60- } elseif (method_exists ($ request , 'setSessionFactory ' )) {
58+ if (!$ request ->hasSession ()) {
6159 $ request ->setSessionFactory (function () { return $ this ->getSession (); });
62- } elseif ($ session = $ this ->getSession ()) {
63- $ request ->setSession ($ session );
6460 }
6561
6662 $ session = $ session ?? ($ this ->container && $ this ->container ->has ('initialized_session ' ) ? $ this ->container ->get ('initialized_session ' ) : null );
You can’t perform that action at this time.
0 commit comments