From 58a0ca26224d2189ef0322f8b68657b90ebf425e Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Mon, 7 Aug 2023 22:34:47 +0100 Subject: [PATCH] Replace GetResponseEvent by RequestEvent --- src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php | 4 ++-- .../Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php b/src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php index b435d99ec..f587c2826 100644 --- a/src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php +++ b/src/Wallabag/CoreBundle/Event/Listener/LocaleListener.php @@ -3,7 +3,7 @@ namespace Wallabag\CoreBundle\Event\Listener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\KernelEvents; /** @@ -18,7 +18,7 @@ class LocaleListener implements EventSubscriberInterface $this->defaultLocale = $defaultLocale; } - public function onKernelRequest(GetResponseEvent $event) + public function onKernelRequest(RequestEvent $event) { $request = $event->getRequest(); if (!$request->hasPreviousSession()) { diff --git a/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php b/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php index 0503a7e34..2cd09fa1a 100644 --- a/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php +++ b/tests/Wallabag/CoreBundle/Event/Listener/LocaleListenerTest.php @@ -7,7 +7,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; use Wallabag\CoreBundle\Event\Listener\LocaleListener; @@ -82,6 +82,6 @@ class LocaleListenerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - return new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); + return new RequestEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); } }