Merge pull request #6811 from yguedidi/replace-getresponseevent-by-requestevent

Replace GetResponseEvent by RequestEvent
This commit is contained in:
Kevin Decherf 2023-08-08 16:53:18 +02:00 committed by GitHub
commit 807d473564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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()) {

View file

@ -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);
}
}