From 21b75eac71342310d9b5dccae66dca04ca140d12 Mon Sep 17 00:00:00 2001 From: Giovanni Scioni Date: Fri, 23 Aug 2024 12:27:28 +0200 Subject: [PATCH 1/3] feat: handling sf deprecation suppression --- src/EventListener/BlameListener.php | 5 ++++- src/EventListener/IpTraceListener.php | 3 +++ src/EventListener/LocaleListener.php | 5 ++++- src/EventListener/LoggerListener.php | 5 ++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/EventListener/BlameListener.php b/src/EventListener/BlameListener.php index 62bd2b53..3521ded2 100644 --- a/src/EventListener/BlameListener.php +++ b/src/EventListener/BlameListener.php @@ -48,7 +48,10 @@ public function onKernelRequest(RequestEvent $event): void } } - public static function getSubscribedEvents() + /** + * @return array + */ + public static function getSubscribedEvents(): array { return array( KernelEvents::REQUEST => 'onKernelRequest', diff --git a/src/EventListener/IpTraceListener.php b/src/EventListener/IpTraceListener.php index 857c1b41..dc41444e 100644 --- a/src/EventListener/IpTraceListener.php +++ b/src/EventListener/IpTraceListener.php @@ -33,6 +33,9 @@ public function onKernelRequest(RequestEvent $event): void } } + /** + * @return array> + */ public static function getSubscribedEvents(): array { return array( diff --git a/src/EventListener/LocaleListener.php b/src/EventListener/LocaleListener.php index 7d12bfb8..ae72beb0 100644 --- a/src/EventListener/LocaleListener.php +++ b/src/EventListener/LocaleListener.php @@ -29,7 +29,10 @@ public function onKernelRequest(RequestEvent $event): void $this->translatableListener->setTranslatableLocale($event->getRequest()->getLocale()); } - public static function getSubscribedEvents() + /** + * @return array + */ + public static function getSubscribedEvents(): array { return array( KernelEvents::REQUEST => 'onKernelRequest', diff --git a/src/EventListener/LoggerListener.php b/src/EventListener/LoggerListener.php index 72576cd5..66146698 100644 --- a/src/EventListener/LoggerListener.php +++ b/src/EventListener/LoggerListener.php @@ -55,7 +55,10 @@ public function onKernelRequest(RequestEvent $event): void } } - public static function getSubscribedEvents() + /** + * @return array + */ + public static function getSubscribedEvents(): array { return array( KernelEvents::REQUEST => 'onKernelRequest', From 82359867b305f081fa5bccb09480beb964c29bab Mon Sep 17 00:00:00 2001 From: Giovanni Scioni Date: Fri, 23 Aug 2024 13:27:16 +0200 Subject: [PATCH 2/3] fix: removes possibly BC --- src/EventListener/BlameListener.php | 3 +-- src/EventListener/IpTraceListener.php | 2 +- src/EventListener/LocaleListener.php | 2 +- src/EventListener/LoggerListener.php | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/EventListener/BlameListener.php b/src/EventListener/BlameListener.php index 3521ded2..5908605e 100644 --- a/src/EventListener/BlameListener.php +++ b/src/EventListener/BlameListener.php @@ -4,7 +4,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\RequestEvent; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; @@ -51,7 +50,7 @@ public function onKernelRequest(RequestEvent $event): void /** * @return array */ - public static function getSubscribedEvents(): array + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => 'onKernelRequest', diff --git a/src/EventListener/IpTraceListener.php b/src/EventListener/IpTraceListener.php index dc41444e..5143caa5 100644 --- a/src/EventListener/IpTraceListener.php +++ b/src/EventListener/IpTraceListener.php @@ -36,7 +36,7 @@ public function onKernelRequest(RequestEvent $event): void /** * @return array> */ - public static function getSubscribedEvents(): array + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => ['onKernelRequest', 500], diff --git a/src/EventListener/LocaleListener.php b/src/EventListener/LocaleListener.php index ae72beb0..6d323526 100644 --- a/src/EventListener/LocaleListener.php +++ b/src/EventListener/LocaleListener.php @@ -32,7 +32,7 @@ public function onKernelRequest(RequestEvent $event): void /** * @return array */ - public static function getSubscribedEvents(): array + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => 'onKernelRequest', diff --git a/src/EventListener/LoggerListener.php b/src/EventListener/LoggerListener.php index 66146698..79f91c35 100644 --- a/src/EventListener/LoggerListener.php +++ b/src/EventListener/LoggerListener.php @@ -58,7 +58,7 @@ public function onKernelRequest(RequestEvent $event): void /** * @return array */ - public static function getSubscribedEvents(): array + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => 'onKernelRequest', From 3890e28c374a4e5ff50005df1ff1a85b2bd177e8 Mon Sep 17 00:00:00 2001 From: Giovanni Scioni Date: Tue, 27 Aug 2024 19:12:24 +0200 Subject: [PATCH 3/3] chore: reverting native return type on final classes --- src/EventListener/IpTraceListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventListener/IpTraceListener.php b/src/EventListener/IpTraceListener.php index 5143caa5..dc41444e 100644 --- a/src/EventListener/IpTraceListener.php +++ b/src/EventListener/IpTraceListener.php @@ -36,7 +36,7 @@ public function onKernelRequest(RequestEvent $event): void /** * @return array> */ - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return array( KernelEvents::REQUEST => ['onKernelRequest', 500],