Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Sep 9, 2025

The code is allowed, see https://3v4l.org/mN8qD
which currently skipped https://getrector.com/demo/0eb40273-c265-4c33-8540-6fe2cfb029b0

This PR allow to use the name if same with current namespace.

namepace App\Bar;

 class FqcnCurrentSameClass
 {
-    public \App\Bar\FqcnCurrentSameClass $prop;
+    public FqcnCurrentSameClass $prop;

This PR handle on namespaced code.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it to have faster feedback to test ;)

@samsonasik samsonasik merged commit e614730 into main Sep 9, 2025
49 checks passed
@samsonasik samsonasik deleted the autoimport-name-in-namespaced-scope branch September 9, 2025 17:40
@samsonasik
Copy link
Member Author

It seems cause invalid apply on conflict fqcn vs short name last name equal, see

https://getrector.com/demo/33737310-3dd2-4e5a-9dce-b14781b11579

Reverting for now.

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.

2 participants