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
PHPStan is overly eager in determining a call to propery_exists() always returns false in PHP 8.2
when a class does not define a property itself - however its children might define the property.
In case of a final class, the result of property_exists() is indeed fixed.
I believe this change has been introduced due to the deprecation of dynamic properties in PHP 8.2, thus PHPStan
is behaving differently there.
Bug report
PHPStan is overly eager in determining a call to
propery_exists()
always returnsfalse
in PHP 8.2when a class does not define a property itself - however its children might define the property.
In case of a final class, the result of
property_exists()
is indeed fixed.I believe this change has been introduced due to the deprecation of dynamic properties in PHP 8.2, thus PHPStan
is behaving differently there.
Code snippet that reproduces the problem
https://phpstan.org/r/041cd047-46fc-4250-847f-9bcc62a98c0f
Expected output
No error in the linked snippet, the code works as written (and
property_exists()
does return different results): https://3v4l.org/3pFPbThe text was updated successfully, but these errors were encountered: