You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change is intended as part of a bugfix for this issue: #2959
Yeah, to use the PHPDoc is the correct approach. That way PHPStan will also enforce the same type in child classes as part of bleeding edge. There are new rules around that in 0.12.95.
Bug report
After last release
0.12.96
, PHPStan stopped to auto-detect constant type when get from a variable.Code snippet that reproduces the problem
https://phpstan.org/r/58f32d4f-e85d-4f43-9b09-89d6e7235c39
Expected output
I am not sure if it is detected incorrectly.
Note that, if add PHPDoc on the constant no error is reported.
But is strange because when accessed directly from the class it passes, but not from a variable.
Did PHPStan help you today? Did it make you happy in any way?
Yes! PHPStan is awesome. I love you.
The text was updated successfully, but these errors were encountered: