HELPME
HELPME

Reputation: 754

Is it possible in PhpStorm to automatically change namespaces and uses according to a changed project folder structure?

I've got to a point where I need to change my project folder structure. When I'll do so, some namespaces will change and after, some use statements will need to be different.

So I'm wondering if there is a way (maybe PhpStorm has some functionality for it) to handle changed namespaces and use statements automatically?

Upvotes: 1

Views: 1942

Answers (2)

lucid
lucid

Reputation: 422

There is no feature like the one you ask for, for as far as I'm aware. You can however use the following method for the use statements:

Use CTRL + SHIFT + R (Replace in path) to replace the old use statements throughout your whole project with the updated statement.

This just leaves renaming the namespaces, which you'll have to do yourself.

Upvotes: 2

myxaxa
myxaxa

Reputation: 1381

you can use refactor if I understood correctly what you want: https://www.jetbrains.com/help/phpstorm/move-namespace-dialog.html

Upvotes: 3

Related Questions