-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
[AutoImport] Do not add cast on valid Integer type on Name Node on auto import enabled #6236
Conversation
…to import enabled
91a6c1e
to
7bed825
Compare
@carlos-granados @TomasVotruba I added I will add more test for direct |
I added failing fixture for from rector-src/src/NodeTypeResolver/NodeTypeResolver/StaticCallMethodCallTypeResolver.php Line 72 in 3ed476b
which has |
Fixed 🎉 |
// not instanceof FullyQualified means it is a Name | ||
if (! $node instanceof FullyQualified && $node->hasAttribute(AttributeKey::NAMESPACED_NAME)) { | ||
return $this->resolve(new FullyQualified($node->getAttribute(AttributeKey::NAMESPACED_NAME))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really needed to patch StaticCall
that imported fixture https://github.com/rectorphp/rector-src/pull/6236/files#diff-ec6cd31df51e19b0199b350a318339fbc3e2b1aa740593511a466849e7fc5289 as a proof that namespacedName
attribute is needed on NameTypeResolver
👍
All checks have passed 🎉 @TomasVotruba I am merging it ;) |
Fixes rectorphp/rector#8793