Skip to content

Conversation

@solverat
Copy link

@solverat solverat commented Jan 8, 2026

This PR fixes the rule ForeachItemsAssignToEmptyArrayToAssignRector, which currently ignores array modifications in skipped foreach loops, leading to incorrect direct assignments that overwrite previously collected data.

Fixes #9587 and probable #9534.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

This repository content is generated by rectorphp/rector-src. Please open pull request to rectorphp/rector-src.

@github-actions github-actions bot closed this Jan 8, 2026
@solverat solverat deleted the patch-1 branch January 8, 2026 19:03
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.

Incorrect behavior of ForeachItemsAssignToEmptyArrayToAssignRector

1 participant