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
Conditionally setting a bool property to true in an anonymous function is seemingly ignored and afterwards, the property is reported as if.alwaysFalse.
The linked playground code is a heavily simplified example, that might seem unnecessarily complicated for what it does.
Please don't suggest how I could achieve this with simpler code.
I want to know whether this is a genuine limitation of PHPStan that I simply have to ignore (for example with baseline) or a bug.
Ideally PHPStan should detect no error, as the property in the given example is definitely true
Did PHPStan help you today? Did it make you happy in any way?
I love how rapidly I can crunch through the PHPStan errors with PHPStan Pro after increasing the level and how I always find some weird bug or oversight in code that was not touched in years
The text was updated successfully, but these errors were encountered:
Bug report
Conditionally setting a bool property to true in an anonymous function is seemingly ignored and afterwards, the property is reported as
if.alwaysFalse
.The linked playground code is a heavily simplified example, that might seem unnecessarily complicated for what it does.
Please don't suggest how I could achieve this with simpler code.
I want to know whether this is a genuine limitation of PHPStan that I simply have to ignore (for example with baseline) or a bug.
Code snippet that reproduces the problem
https://phpstan.org/r/34645b2b-7911-4a98-8fa2-67e5e73a9868
Expected output
Ideally PHPStan should detect no error, as the property in the given example is definitely true
Did PHPStan help you today? Did it make you happy in any way?
I love how rapidly I can crunch through the PHPStan errors with PHPStan Pro after increasing the level and how I always find some weird bug or oversight in code that was not touched in years
The text was updated successfully, but these errors were encountered: