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

[CodingStyle] Handle ClassConstFetch on RemoveUnusedAliasRector #785

Merged
merged 8 commits into from
Aug 29, 2021

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Aug 29, 2021

After PR #784 , I think ClassConstFetch should be removed too if there is no conflict with use alias, it only make sense to have alias only if has conflict name in use statement.

Ref for original issue: rectorphp/rector#5687
Ref for original PR that introduce it: rectorphp/rector#5691

ref https://3v4l.org/H4lrmT for demo that it actually same to use alias or not.

@samsonasik samsonasik changed the title [CodingStyle] Handle CClassConstFetch on RemoveUnusedAliasRector [CodingStyle] Handle ClassConstFetch on RemoveUnusedAliasRector Aug 29, 2021
@samsonasik
Copy link
Member Author

/cc @DieterHolvoet for the change of behaviour.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

@TomasVotruba
Copy link
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit 13bf954 into main Aug 29, 2021
@TomasVotruba TomasVotruba deleted the use-as-class-constant branch August 29, 2021 11:47
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.

3 participants