bugsnag / bugsnag-symfony

BugSnag notifier for the Symfony PHP framework. Monitor and report errors in your Symfony apps.
https://docs.bugsnag.com/platforms/php/symfony
MIT License
43 stars 21 forks source link

GetResponseForExceptionEvent deprecation notice still occurs in 1.6 #97

Closed likeuntomurphy closed 4 years ago

likeuntomurphy commented 4 years ago

Expected behavior

With the changes in #93, no deprecation notices should be thrown.

Observed behavior

I am still seeing this notice:

User Deprecated: The "Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent::getException()" method is deprecated since Symfony 4.4, use "getThrowable()" instead.

Steps to reproduce

The easiest thing to do is to hit a route behind a firewall to trigger an AccessDeniedException in dev and check the deprecation logs in the profiler.

Version

1.6 (Symfony 4.4)

Additional information

The conditional checks in BugsnagListener::onKernelException() need to be reversed so that ExceptionEvent is checked first — because it simply extends GetResponseForExceptionEvent, the first condition is also true and hence the deprecation notice is still thrown.

mattdyoung commented 4 years ago

Hi @likeuntomurphy

Thanks for raising this. We're aiming to fix in the next release.

tomlongridge commented 4 years ago

This is now fixed in 1.6.1.