-
-
Notifications
You must be signed in to change notification settings - Fork 728
[Renaming] Skip RenameMethodRector on interface wildcard used #5622
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All checks have passed 🎉 @TomasVotruba it is ready for review. |
Thank you 👍 |
Thanks!! |
ruudk
added a commit
to ruudk/rector
that referenced
this pull request
Feb 22, 2021
rectorphp#5622 only partially fixed the problem. It should also check if `$methodCallRename->getOldClass()` is an interface, and skip that too
ruudk
added a commit
to ruudk/rector
that referenced
this pull request
Feb 22, 2021
I realized that I did not provide the test case in rectorphp#5564 correctly as I was running it in my project. By changing the existing test it fails again. Why? Because `OtherWildcardSubscriber` does match the wildcard `*WildcardSubscriber`. That one does not implement an interface. Because `$this->classManipulator->hasParentMethodOrInterface` just tries to find the first matching class that matches the wildcard, it checks that one always. That means that the implementation in rectorphp#5622 is not correct (and naive).
ruudk
added a commit
to ruudk/rector
that referenced
this pull request
Feb 22, 2021
…rectorphp#5622)" This reverts commit 0b17b91.
ruudk
added a commit
to ruudk/rector
that referenced
this pull request
Feb 22, 2021
I realized that I did not provide the test case in rectorphp#5564 correctly as I was running it in my project. By changing the existing test it fails again. Why? Because `OtherWildcardSubscriber` does match the wildcard `*WildcardSubscriber`. That one does not implement an interface. Because `$this->classManipulator->hasParentMethodOrInterface` just tries to find the first matching class that matches the wildcard, it checks that one always. That means that the implementation in rectorphp#5622 is not correct (and naive).
TomasVotruba
added a commit
that referenced
this pull request
Feb 16, 2024
rectorphp/rector-src@39d9c32 [Php83] Early check private method in child before check parent on AddOverrideAttributeToOverriddenMethodsRector (#5622)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #5564