Skip to content

[AutoImport] Handle case insensitive name collide on auto import#4829

Merged
samsonasik merged 7 commits intomainfrom
insensitive-use
Aug 21, 2023
Merged

[AutoImport] Handle case insensitive name collide on auto import#4829
samsonasik merged 7 commits intomainfrom
insensitive-use

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik
Copy link
Copy Markdown
Member Author

@staabm the issue seems when both class not yet imported, as the UseImportsResolver->resolve() not yet refreshed.

@samsonasik samsonasik changed the title [AutoImport] Handle case insensiive name collide on auto import [AutoImport] Handle case insensitive name collide on auto import Aug 21, 2023
@samsonasik
Copy link
Copy Markdown
Member Author

Fixed 🎉 /cc @staabm

@samsonasik
Copy link
Copy Markdown
Member Author

use const case insensitive is allowed, so I leave as is, see https://3v4l.org/lteVa

@samsonasik
Copy link
Copy Markdown
Member Author

All checks have passed 🎉 @TomasVotruba let's merge it to have faster feedback to test ;)

@samsonasik samsonasik enabled auto-merge (squash) August 21, 2023 15:04
@samsonasik samsonasik merged commit cdccb51 into main Aug 21, 2023
@samsonasik samsonasik deleted the insensitive-use branch August 21, 2023 15:05
@staabm
Copy link
Copy Markdown
Contributor

staabm commented Aug 21, 2023

thanks!

@staabm
Copy link
Copy Markdown
Contributor

staabm commented Aug 28, 2023

do we have the same problem here?

?

@samsonasik
Copy link
Copy Markdown
Member Author

@staabm probably, could you create failing testcase at demo page https://getrector.com/demo or probably new fixture on ?

https://github.com/rectorphp/rector-src/tree/main/tests/Issues/AutoImport/Fixture

thank you.

@staabm
Copy link
Copy Markdown
Contributor

staabm commented Aug 28, 2023

I think this one reproduces the problem:

https://getrector.com/demo/4d8aeddb-8f37-4695-b322-491d4d719475

@staabm
Copy link
Copy Markdown
Contributor

staabm commented Aug 28, 2023

hmm no it doesn't. I guess my problem I see locally is caused, because the fix for this issue is not yet part of a release

@samsonasik
Copy link
Copy Markdown
Member Author

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.

fatal error after importNames()

2 participants