Rename class - conflicts in use with same name
Hi, I want to rename an existing class from “foo1” to “foo2”. But than I got conflicts in other scripts using other classes with the same name from other namespaces. The rename/refactoring doesn't create a necessary alias.
my class
namespace test1;
class Foo1 {};some scripts:
use test1/Foo1;
use test2/Foo2;
$myfoo = new Foo1;
if I know rename my class from “Foo1” to “Foo2” I will get conflicts in the script somewhere else, because of the same name. Is there a possibility to autom. create alias if there are conflicts?
Please sign in to leave a comment.
I've filed a bug: https://youtrack.jetbrains.com/issue/WI-86134
In the meanwhile, you can alias the `test1\Foo1` import before renaming (`consumer-aliased.php`). The rename then changes only the FQN in that `use` statement.
Thank's