Move NS, potential bug?

When I'm moving a namespace similar classes are suggested to be moved as well. When deselecting some of them, they stay in the original directory but their namespace is changed anyway. This doesn't seem to make sense - so maybe a bug?

Thanks for all the good work with all of the IDEs :-)

4 comments
Comment actions Permalink

https://youtrack.jetbrains.com/issue/WI-43185

But it's not a bug, it's the expected behavior - this dialog is not designed for excluding files from refactoring at all but for leaving some files in the directories where they belonged (in case, for instance, these directories don't fall under the PSR-0/4 structure).

There's no way to exclude a class from processing, but you can either move a single class to another namespace as Andriy suggested or then just move this single file back. Would that do?

0
Comment actions Permalink

Well, it depends ;-)

I was looking for a way to move several classes (but not all) at once from the same namespace. "Moving classes" means moving them one by one. Thats not ideal.

The argument of not beeing under PSR-4 structure sounds like a bit outdated to me. And what was PSR-0 again ;-) .

I guess more likely you might want to refactor a namespace according to PSR-4. Anyway, an option (or a name for what I'm trying to do) might be "split namespace" which would allow to separate some classes namespace wise from others without touching the others.

Does that make kind of sense?

0
Comment actions Permalink

We have this request for being able to move multiple classes, please vote: https://youtrack.jetbrains.com/issue/WI-20976

0
Comment actions Permalink

I did, thank you

0

Please sign in to leave a comment.