-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
[Php56] Skip after infinite loop on AddDefaultValueForUndefinedVariableRector #3390
Conversation
…r with infinite loop # Failing Test for AddDefaultValueForUndefinedVariableRector Based on https://getrector.com/demo/e1b4cf4e-c34f-466d-ac1a-4ecdbffca61c
Oh, it seems can't be resolved by check first stmt as first stmt can be multiple condition, for example: echo 'test';
while (true !== false) {
} that still added. I added more failing fixture for it e78c0ee |
I am not sure about this, the question is why create abvious infinite loop on early code in the first place :) while (true !== false) {
}
$a = [];
if ($b = $yes) {
$a[] = 'test';
}
return $a; I am closing this for now. |
Re-open, @jackbentley it seems it can be resolved by check parent Node of Stmt is an Unreachable stmt on |
Finally, All checks have passed 🎉 @TomasVotruba it is ready for review. |
@TomasVotruba I am merging it ;) |
Closes #3388
Fixes rectorphp/rector#7777