Skip to content

Commit

Permalink
fix: Get rid of deprecation notice for StreamedResponseListener
Browse files Browse the repository at this point in the history
There is deprecation notice returned by Symfony's `DebugClassLoader`:

> Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "K911\Swoole\Bridge\Symfony\HttpFoundation\StreamedResponseListener" now to avoid errors or add an explicit @return annotation to suppress this message

Adding native return type is fully compatible and will clean that notice.
  • Loading branch information
Wirone authored and Martin Fris committed Dec 7, 2022
1 parent d9471cb commit 973fcfb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function onKernelResponse(ResponseEvent $event): void
$this->delegate->onKernelResponse($event);
}

public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
return [
KernelEvents::RESPONSE => ['onKernelResponse', -1024],
Expand Down

0 comments on commit 973fcfb

Please sign in to comment.