Skip to content

[Php55][Renaming] Handle rename string on combination StringClassNameToClassConstantRector+RenameStringRector#4869

Merged
samsonasik merged 5 commits intomainfrom
handle-rename-string
Aug 28, 2023
Merged

[Php55][Renaming] Handle rename string on combination StringClassNameToClassConstantRector+RenameStringRector#4869
samsonasik merged 5 commits intomainfrom
handle-rename-string

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik samsonasik commented Aug 28, 2023

Fixes rectorphp/rector#8160

StringClassNameToClassConstantRector directly use return NodeTraverser::DONT_TRAVERSE_CHILDREN on a refactor that cause other rule stopped:

if ($node instanceof FuncCall) {
if ($this->isName($node, 'is_a')) {
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
}
return null;
}

this should only stop below on current rule only.

This PR also a rework of PR:

@samsonasik
Copy link
Copy Markdown
Member Author

@TomasVotruba it works 🎉

@samsonasik
Copy link
Copy Markdown
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it to have faster feedback to test ;)

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.

RenameStringRector not run after StringClassNameToClassConstantRector

2 participants