Skip to content

Proper fix to handle ClassReflection refresh on ClassLike changed - #8728

Merged
samsonasik merged 2 commits into
mainfrom
proper-fix
Oct 20, 2026
Merged

samsonasik merged 2 commits into
mainfrom
proper-fix

Conversation

@samsonasik

Copy link
Copy Markdown
Member

@TomasVotruba here should be proper fix to fix infinite loop on rector-laravel and drupal-rector:

The issue was the rules there tried to resolve from ClassReflection which not refreshed to due the idempoten.

This PR try to fix it with added test for it 👍

@samsonasik

Copy link
Copy Markdown
Member Author

All green 🎉 @TomasVotruba I am merging it ;)

@samsonasik
samsonasik merged commit 7bc5a18 into main Oct 20, 2026
49 checks passed
@samsonasik
samsonasik deleted the proper-fix branch October 20, 2026 14:30
@TomasVotruba

Copy link
Copy Markdown
Member

Thanks 👍

Can you add a little bench test before/after this? AST resolver might a quite expensive.
A script in bench/* would do with some reproducer and timing results.

@samsonasik

Copy link
Copy Markdown
Member Author

I will try, it still has another infinite loop tho, I am continuing on

then I can create a benchmark for it.

@samsonasik

Copy link
Copy Markdown
Member Author

@TomasVotruba rector-drupal now green 🎉

https://github.com/rectorphp/rector-src/actions/runs/39443715849/job/118701428268

Screenshot 2026-10-20 at 21 59 27

@samsonasik

Copy link
Copy Markdown
Member Author

I improved performance of ClassReflection refresh and add script benchmark on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants