From 61bf418c4ae770fbe46b8779cc26d65d36236df6 Mon Sep 17 00:00:00 2001 From: Klapaudius Date: Tue, 29 Sep 2020 23:00:32 +0200 Subject: [PATCH] Symfony 5 compliant --- Security/Firewall/OAuthListener.php | 6 +++--- Tests/Security/Firewall/OAuthListenerTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Security/Firewall/OAuthListener.php b/Security/Firewall/OAuthListener.php index b2565256..32e3ecd2 100644 --- a/Security/Firewall/OAuthListener.php +++ b/Security/Firewall/OAuthListener.php @@ -16,7 +16,7 @@ use FOS\OAuthServerBundle\Security\Authentication\Token\OAuthToken; use OAuth2\OAuth2; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; @@ -58,9 +58,9 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM } /** - * @param GetResponseEvent $event the event + * @param RequestEvent $event the event */ - public function __invoke(GetResponseEvent $event) + public function __invoke(RequestEvent $event) { if (null === $oauthToken = $this->serverService->getBearerToken($event->getRequest(), true)) { return; diff --git a/Tests/Security/Firewall/OAuthListenerTest.php b/Tests/Security/Firewall/OAuthListenerTest.php index ee46b558..7c16b5f0 100644 --- a/Tests/Security/Firewall/OAuthListenerTest.php +++ b/Tests/Security/Firewall/OAuthListenerTest.php @@ -18,7 +18,7 @@ use FOS\OAuthServerBundle\Tests\TestCase; use OAuth2\OAuth2; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; class OAuthListenerTest extends TestCase @@ -58,7 +58,7 @@ public function setUp() } $this->event = $this - ->getMockBuilder(GetResponseEvent::class) + ->getMockBuilder(RequestEvent::class) ->disableOriginalConstructor() ->getMock() ;