vendor/symfony/http-kernel/EventListener/SessionListener.php line 51

  1.  * Sets the session in the request.
  2.  *
  3.  * @author Fabien Potencier <fabien@symfony.com>
  4.  *
  5.  * @final
  6.  */
  7. class SessionListener extends AbstractSessionListener
  8. {
  9.     protected function getSession(): ?SessionInterface
  10.     {
  11.         if ($this->container->has('session_factory')) {
  12.             return $this->container->get('session_factory')->createSession();
  13.         }
  14.         return null;
  15.     }
  16. }