- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
FullyQualifiedStrictTypesFixer - fix same classname is imported from … #6197
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
Pang\Pung $pangpung, | ||
Pyng\Pung\Pong $pongpyngpangpang, | ||
Bar\Baz\Buz $bazbuz | ||
\Ping\Something $something, |
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.
I think the current fixer is wrong here, removing the leader \
within the current namespace changes the type that is supposedly used here
Pung $other1, | ||
Pang\Pung $other2, | ||
Pyng\Pung\Pong $other3, | ||
\Foo\Bar\Baz\Buz $other4 |
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.
same here
note to self; make coverage report of the fixer to see if all paths are covered |
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.
Let's add a test case for:
<?php
namespace Foo\Bar;
function test(\Foo\Bar $x) {}
nice edge-case, thanks 👍 , patched |
…global and non-global namespace
closes #4726
there are multiple issues with this fixer, please have a look at the new logic and tests