-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
[Removing] Add RemoveNamespaceRector #2013
Conversation
…amespace declaration statement has to be the very first statement
All checks have passed 🎉 @TomasVotruba it is ready for review. |
Thanks 👍 |
Hi @samsonasik , I'm getting to this rule now related with removing complex stmt attributes. I'm curious, what is the upgrade use case for this rule? Where is used? Maybe it should be part of PhpStorm refactoring scope. |
Remove namespace can be used to simplify application which only for 1 purpose (1 module) which no need namespace, eg, a |
The issue is with find and replace will cause issue on non-compount use statement after namespace removed, so this rule is used for it to handle it. |
Such namespace is optional and it can be anything. It's not part of a framework upgrade.
I'm not sure I understand. Could you share an example? What framework/project is it related to? |
I don't have example, just add it as there is RenameNamespaceRector rule, so I though it should be a remove namespace or clear namespace. I am fine if it is going to be removed. |
I accepted this to quickly without proppery jugdment, my appology. Rector should help with automated and repeated tasks, this should be handled with PhpStorm or manually.
👍 Instead we should add configuration validation in RenameNamespaceRector to avoid empty namespaces. |
Ref #2133 |
No description provided.