-
Notifications
You must be signed in to change notification settings - Fork 24
PHP Stan Results #49
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
Comments
I attempted to tackle the remaining This one in particular has me going back and forth, in order to tackle:
I ended up with something like this, which isn't good - any suggestions on this?
|
The same issue exists in many other classes, where multiple class variables are required in order to satisfy phpstan. |
@pkevan 🤔 TBH, my initial thought is to do what you did—declare the properties and explain their use. This would let phpstan catch legit issues of one of us using an expected property that actually impacts things negatively. With PHP 8.2, this would throw a deprecation notice too, that we get around by the That said, we can also declare that
PHPStan would ignore the undeclared properties since we expect acf_field (sub)classes to create properties at will. Open to other thoughts. |
I think looking back at this after some time away, it seems like the right way of doing it anyway. There are probably still going to be some exception to the phpstan fixes that won't be resolved, which will live in |
Level 1 PHPStan revealed the following issues, which are in the baseline file.
The text was updated successfully, but these errors were encountered: