Reputation: 66430
I just tried moving a class in PhpStorm 10.0.3 using F6, yet it only changed the file's location and not its namesapce. Manually adapting the namespace feels wrong, especially if the class has been used at multiple places.
Upvotes: 1
Views: 420
Reputation: 66430
Move the cursor upon the classe's definition, and then press F6. This will open the move class dialog and there your have the option to move it to a different namepsace.
class Foo
{
}
The cursor has to be on Foo
.
One has to both specify the target namespace and target destination directory. Then refactoring works as expected.
If you press only F6 when your cursor is inside any other place in the class file, phpstorm will only open up the move dialog.
Upvotes: 3