**Symfony version(s) affected**: 5.2.4 **Description** If not support of sessions in the app,`getSession()`wile throw SessionNotFoundException in the `onLogout()` ```php class SessionLogoutListener implements EventSubscriberInterface { public function onLogout(LogoutEvent $event): void { $event->getRequest()->getSession()->invalidate(); } public static function getSubscribedEvents(): array { return [ LogoutEvent::class => 'onLogout', ]; } } ``` **Possible Solution** Check if it has session before `getSession()`