-
-
Notifications
You must be signed in to change notification settings - Fork 727
[DX] Narrow wobly strings to strict ObjectType() #5693
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
…sistency and use of PHPStan ObjectType
b7651c2
to
472774f
Compare
0967601
to
1722b71
Compare
@TomasVotruba I see that this PR removes the support for wildcard renames. Does that mean it's not possible anymore or is there a different way to do this? I find the wildcard support super useful as it allows me to rename methods that are part of objects that are in specific namespaces (like Does it mean we need to close #5652? |
Indeed. The reason is to have more consistent type system. We basically inherit the robust one from PHPStan. Now I see it was a mistake to go with wildcards on class type resolution. Your use case should be solved with PHPStorm refactoring or custom Rector rule instead. This change to Yes, the #5652 should be closed. |
It could still be possible if there was another thing in place that would search for all classes that match wildcard and then feed them in as strings to the rename method config. Would that make sense? |
It would have to be special kind of I can't imagine practical use case for this though. Rector should not replace one-time PHPStorm custom refactoring, but handle repeated pattern refactoring. |
rectorphp/rector-src@10c7bc6 [Performance][Php81] Ensure check readonly on param only on __construct() method (#5693)
rectorphp/rector-src@10c7bc6 [Performance][Php81] Ensure check readonly on param only on __construct() method (#5693)
Cherry picks from static reflection PRs: #5665