Skip to content

[Php84] Allow early return on ForeachToArrayAllRector#7316

Merged
samsonasik merged 3 commits intorectorphp:mainfrom
Orest-Divintari:update-foreach-to-array-all
Sep 23, 2025
Merged

[Php84] Allow early return on ForeachToArrayAllRector#7316
samsonasik merged 3 commits intorectorphp:mainfrom
Orest-Divintari:update-foreach-to-array-all

Conversation

@Orest-Divintari
Copy link
Contributor

There is already a rule to convert foreach that contains a break statement with array_all. This pr is to add support to the existing rule to convert foreach with early return to array_all

@samsonasik
Copy link
Member

Looks good, let's give it a try, thank you @Orest-Divintari

@samsonasik samsonasik merged commit 1618d2d into rectorphp:main Sep 23, 2025
50 checks passed
@github-actions
Copy link
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants