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

Fix PHP 8.1 deprecation #149

Closed imjoehaines closed 2 years ago

imjoehaines commented 2 years ago

Goal

This is https://github.com/bugsnag/bugsnag-symfony/pull/147 rebased onto next, with some unit tests and a changelog entry. I've also attempted to simplify the nested conditionals that were getting somewhat complicated

I've added tests for the SymfonyRequest class, because there were no tests for it before now (other than indirectly in the Maze Runner suite). These fail when run with PHP 8.1 on next, proving the deprecation is fixed by this PR (e.g. see this failing run)