mikeerickson / phpunit-pretty-result-printer

PHPUnit Pretty Result Printer -- make your PHPUnit tests look pretty!
MIT License
1.2k stars 71 forks source link

Under PHP 8.1, this package (because of one of its dependencies) show deprecation notices #176

Closed mattstauffer closed 2 years ago

mattstauffer commented 2 years ago

What version of this package are you using? 0.31.0

What operating system, Node.js, and npm version? Mac, PHP 8.1

What happened?

Deprecated: Return type of Noodlehaus\AbstractConfig::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/mattstauffer/Sites/novapackages/vendor/hassankhan/config/src/AbstractConfig.php on line 183

What did you expect to happen? No errors

Are you willing to submit a pull request to fix this bug? Yep.

mattstauffer commented 2 years ago

No PR needed; this PR needs to be merged to the dependency: https://github.com/hassankhan/config/pull/135

And then it'll be fixed. I've just put this issue here for reference.

mattstauffer commented 2 years ago

Update: The fix was tagged as v3.0.0 so we need to update this package to add support for ^3.0:

https://github.com/mikeerickson/phpunit-pretty-result-printer/blob/b04ebbc920062e29578ce34ac73b87f99190e65a/composer.json#L24

mattstauffer commented 2 years ago

As far as I can tell there are no breaking changes to 3.0:

https://github.com/hassankhan/config/compare/2.2.0...3.0.0

So hopefully we can just change it in composer.json and call it day.