Skip to content

Conversation

ondrejmirtes
Copy link
Member

No description provided.

@ondrejmirtes ondrejmirtes marked this pull request as ready for review September 9, 2025 12:56
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit ce6bef1 into 2.1.x Sep 9, 2025
441 of 457 checks passed
@ondrejmirtes ondrejmirtes deleted the while-like-fixes branch September 9, 2025 12:56
@ondrejmirtes
Copy link
Member Author

/cc @staabm no issue bot jackpots, merging to see if it finds something on real-world projects but probably not worth pursuing more 😊

@staabm
Copy link
Contributor

staabm commented Sep 9, 2025

this loop business is so complicated, I tried find more things but its really hard.

one case which errors is
https://phpstan.org/r/d883e978-f368-4bf4-afae-8683f7f5ebd3

but not sure whether its a bug or intentional

@ondrejmirtes
Copy link
Member Author

I think in the linked example the for loop never executes which is reported by Strict comparison using !== between array{} and array{} will always evaluate to false..

A closer example to the original one is https://phpstan.org/r/02d50b61-9e19-4826-a593-b08f44bd0a48 which behaves as expected.

I just realized most of the code works as it should (it doesn't merge scope from dead code) and I can revert most of the changes.

@ondrejmirtes
Copy link
Member Author

That's why there's no impact of the changes I made on open issues and real-world code.

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