Rename namespace in NetBeans PHP?

Is there a way to easily rename a namespace in ide NetBeans that affects all other namespace declarations?

+6
source share
1 answer

This is a workaround, but can help you change all namespace declarations within the project:

  • Click on the folder containing all the source files (for example, src / in the root directory of the project)
  • Press CTRL + H
  • Enter the namespace or part of the namespace that you want to replace (for example, Foo \ Bar) in the search field and the target namespace in the "replace with" field (for example, Foo \ MyNewBar)
  • Click replace
  • After a while, at the bottom of the screen you will see all the places that can be replaced. You can replace all or select only some of them. Be careful, all files are automatically saved after the change.
+8
source

Source: https://habr.com/ru/post/913380/


All Articles