Skip to content
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

[DowngradePhp73] Ensure reset() after go to end() array and got the key on DowngradeArrayKeyFirstLastRector #214

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

samsonasik
Copy link
Member

@kapersoft @TomasVotruba here the proper solution to fix rectorphp/rector#8531

@samsonasik samsonasik closed this Mar 8, 2024
@samsonasik samsonasik reopened this Mar 8, 2024
@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit e477635 into main Mar 8, 2024
5 checks passed
@samsonasik samsonasik deleted the ensure-reset branch March 8, 2024 06:25
@samsonasik samsonasik changed the title [DowngradePhp73] Ensure reset() after go to end() array on DowngradeArrayKeyFirstLastRector [DowngradePhp73] Ensure reset() after go to end() array and got the key on DowngradeArrayKeyFirstLastRector Mar 8, 2024
@kapersoft
Copy link

@samsonasik I also tested this PR on my codebase and the endless loops are still gone 😄

Again, thanks for quick response! 👍

@samsonasik
Copy link
Member Author

@kapersoft thank you for testing, this applied to many location on downgraded scope code

rectorphp/rector@28f5dbd

so it definatelly fix many possible infinite loop due to many end() were never reset()-ed after key getted 🎉

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.

DeclareStrictTypesRector::class-rule with the php83-set can cause endless loop
3 participants