-
Notifications
You must be signed in to change notification settings - Fork 92
Reduce NodeVisitor::DONT_TRAVERSE_* usage on ArrayToArrGetRector (part 1) #435
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
Conversation
|
@GeniJaho @driftingly Ready to merge 👍 It will take multiple PRs as there are many usage of it in this repo, this is for starter :) |
|
Is the idea to now use NodeVisitors to mark nodes instead of stopping transversal from what I can see in that PR you mentioned @samsonasik ? |
|
@peterfox I am thinking of set flag attribute via |
|
@peterfox the stop traversal only works on single visitor (eg: callable traverser). On rector rules, it will stop immediatelly the loop without next rule, so the attribute flag is the way to go. |
Okay, do you have any examples I can look at? |
|
I on mobile, will create PR here today, for reuse here, custom node visitor decorate maybe needed. |
|
@peterfox here usage on |
|
@samsonasik great. So essentially all nodes can be examined with |
Rector is removing tweak below node usage via:
see PR:
This PR is starter to keep compatible :)