Compatibility with PHP 8.4#103
Conversation
… 8.4, force upgrade to PHPStan 2, fix new warnings
thecodingmachine/safe to ^3.0|
would be nice to have it merged :) |
| @@ -1,5 +1,5 @@ | |||
| parameters: | |||
| level: max | |||
There was a problem hiding this comment.
Is there a specific reason for lowering the level? Max always defaults to the highest level available in the release. (Being level 10 as of PHPStan 2.0)
There was a problem hiding this comment.
New level max is equivalent to 10 and needs a lot of warnings fixed (mostly dealing with mixed and untyped arrays), maybe outside the scope of this PR.
https://phpstan.org/blog/phpstan-2-0-released-level-10-elephpants#level-10
There was a problem hiding this comment.
Alternative would be to keep it on max, but for the time being baseline the new warnings.
That way the new errors are atleast tracked, and the new checks would be applied to any new logic added to the repository in the future. But i'm not sure what @dbrekelmans his view is on that
(edit, fixed the mention)
There was a problem hiding this comment.
I agree that it's outside the scope of this PR, but it would be best to go back up to max level. It doesn't need to block this PR from being merged. If either of you is willing to produce a follow-up PR where we go back up to max level (and ideally fix the new warnings), that would be greatly appreciated.
There was a problem hiding this comment.
I can propose this next PR.
|
Thanks for the contribution @ddebin! 🎉 |
thecodingmachine/safeto ^3.0 to get compatibility with PHP 8.4thecodingmachine/phpstan-strict-rulesis not compatible with PHPStan 2 and has been removed