Skip to content
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

Import class import itself on aut-loader psr4 #79

Open
N247S opened this issue Apr 6, 2020 · 0 comments
Open

Import class import itself on aut-loader psr4 #79

N247S opened this issue Apr 6, 2020 · 0 comments

Comments

@N247S
Copy link

N247S commented Apr 6, 2020

Goodday,

The title pretty much says it, the plugin automatically adds the namespace and class of the declared class itself. I am using the autoloader psr4 (if that makes any difference in behavior).

When I activate the command 'namespaceResolver.importAll' it correctly imports all other classes, but also the declaredclass itself which causes errors (as it cannot find itself when it is declaring itself).

It has a negative impact on the workflow, because I have to remove it everytime I auto-import-all. Also it is not necessary to import classes in the same namespace (which it is doing). So there are two birds one can kill with one stone, as it shouldn't import itself as it is declared in the same namespace the filescope is at that moment.

version details:
PHP Namespace Resolver 1.1.8
If you need any additional information, feel free to ask!

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

No branches or pull requests

1 participant