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

Remove NormalizeNamespaceByPSR4ComposerAutoloadRector as only moves files to namespaces, does not update any class referenes; better use IDE here #4057

Merged
merged 1 commit into from
Jun 3, 2023

Conversation

TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba TomasVotruba force-pushed the tv-less-psr4-namespace branch 3 times, most recently from fa4738e to 7a983ee Compare June 3, 2023 16:29
…iles to namespaces, does not update any class referenes; better use IDE here
@TomasVotruba TomasVotruba enabled auto-merge (squash) June 3, 2023 16:30
@TomasVotruba TomasVotruba merged commit 1d8b12d into main Jun 3, 2023
@TomasVotruba TomasVotruba deleted the tv-less-psr4-namespace branch June 3, 2023 16:32
@samsonasik
Copy link
Member

/cc @jtojnar

@jtojnar
Copy link
Contributor

jtojnar commented Jun 4, 2023

Thanks for letting me know. The removal is a bit disappointing but I guess it’s expected since we were unable to make the rector work properly. I had hopes for Rector becoming a one-stop shop for transformations of PHP code but I guess that was unrealistic. Especially for one-off global transformations like this.

Anyway, I am not aware of any IDE offering such functionality (maybe we could combine macros with single class/directory renaming?) nor do I work with PHP enough to justify adjusting to PHPStorm but https://github.com/lesphp/psr4-converter looks promising.

@TomasVotruba
Copy link
Member Author

@jtojnar It was not easy descission, but the rule was adding more work than saving. Changing just some class names was rather annoying.

As for IDE, we use "move class" or "move namespace" refactoring, that handles the same operation much better.

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.

3 participants