-
Notifications
You must be signed in to change notification settings - Fork 41
Remove ignoreErrors from PHPStan
#40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gziolo if you don't mind the extra work stripping them out before merge into WP Core then go ahead and merge 🤷
(my 2c: We're not using nor relying on the real array shape, so this is just suppressing the external phpstan-wordpress error in the file by marking the generic they introduce as mixed so they don't get type-checked. tl;dr all this does is hide the error suppression inside the file implementation, instead of centrally declaring that we're not using the (3rd-party) generics for that file. ).
I want to make sure all files are linted for now. I will figure out next week what to do if CI on wordpress-develop is largely unhappy. As an alternative, we might consider silencing only the errors related to generics. |
FTR that was the pre-merge behavior... only generics from
|
|
True. I will revisit next week and revert if that makes more sense 👍🏻 |
|
I tested in WordPress/wordpress-develop#9410 all the latest changes from |
I audited
ignoreErrorsadded to PHPStan (#6 (comment)). I decided to remove it and fix the PHPDoc to make PHPStan happy.