Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

While loop-like fixes #4312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
ondrejmirtes merged 4 commits into 2.1.x from while-like-fixes
Sep 9, 2025
Merged

While loop-like fixes #4312

ondrejmirtes merged 4 commits into 2.1.x from while-like-fixes
Sep 9, 2025

Conversation

Copy link
Member

@ondrejmirtes ondrejmirtes commented Sep 9, 2025

No description provided.

@ondrejmirtes ondrejmirtes marked this pull request as ready for review September 9, 2025 12:56
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
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 😊

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

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.

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
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /