diff --git a/security/form_login_setup.rst b/security/form_login_setup.rst index 7c5001f7dba..dafbc783dca 100644 --- a/security/form_login_setup.rst +++ b/security/form_login_setup.rst @@ -435,7 +435,7 @@ whenever the user browses a page:: use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface; - use Symfony\Component\HttpKernel\Event\GetResponseEvent; + use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Security\Http\Util\TargetPathTrait; @@ -450,7 +450,7 @@ whenever the user browses a page:: $this->session = $session; } - public function onKernelRequest(GetResponseEvent $event): void + public function onKernelRequest(RequestEvent $event): void { $request = $event->getRequest(); if (!$event->isMasterRequest() || $request->isXmlHttpRequest()) {