Sagar Parikh
Sagar Parikh

Reputation: 288

Is it possible if I change the location of file and namespace will automatic change?

I am currently using Sublime & PhpStorm. I don't have much experience in Sublime, but in PhpStorm if I will create new file in folder, it will automatically create class and namespace of that file. So what if I move file to another folder and it will change namespace according to it.

Is that any feature or package available for this functionality?

I already tried F6 for Reflactor | Move, but maybe I am doing something wrong, here is the screenshots

enter image description here

enter image description here

enter image description here

as you can see, using F6 file is moved but namespace is still same.

Upvotes: 0

Views: 336

Answers (1)

Ronak Dhoot
Ronak Dhoot

Reputation: 2321

PhpStrom has feature to refactor code

Refer: https://www.jetbrains.com/help/phpstorm/refactoring-source-code.html

So once you rename or move class it will update namespace and class both

Upvotes: 1

Related Questions