Skip to content

Conversation

@rajyan
Copy link
Contributor

@rajyan rajyan commented Nov 13, 2022

Issue 8212 was closed in #1950 but the test added wasn't correct.
And, this revert commit a1605df made phpstan/phpstan#8212 not work again.

ConditionalExpressions should work in global scope too, so fixed by handling canAnyVariableExist in getVariableType

@ondrejmirtes ondrejmirtes merged commit 95266fd into phpstan:1.9.x Nov 14, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@mityukov
Copy link

mityukov commented Dec 1, 2025

I have this issue in the latest PHPStan when there is a foreach wrapping around the code
https://phpstan.org/r/c030ec12-c267-41a6-951a-0c3bed41fba6

@ondrejmirtes
Copy link
Member

@mityukov This is 3-year-old PR. Please open a bug report instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants