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
{{ message }}
Repository navigation
Null coalesce non-null result implies the caller not to be null - not reflected in consequent conditions #6120
Think I ran into the same issue with a property. Ran into this implementing the PSR-7 message interface which will close/detach the internal resource leading to some weird object states where the internal resource is no longer set.
Activity
neclimdul commentedon Oct 31, 2022
Think I ran into the same issue with a property. Ran into this implementing the PSR-7 message interface which will close/detach the internal resource leading to some weird object states where the internal resource is no longer set.
Here's a bit of a contrived example demonstrating it using a generator.
https://phpstan.org/r/20e1698e-7e49-4793-a542-1640e03e7c6f
Add regression test for #6120
Add regression test for phpstan#6120
phpstan-bot commentedon Feb 18, 2026
@neclimdul After the latest push in 2.2.x, PHPStan now reports different result with your code snippet:
phpstan-bot commentedon Feb 19, 2026
Closed via merging phpstan/phpstan-src#4995
github-actions commentedon Mar 23, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.