PhpStorm 2020.3 Help

Rename dialogs

Refactor | Rename

Shift+F6

ItemDescription
Rename <symbol name> and its usages toIn this field, specify a new name for the symbol.
Search in JavaScript files

Select this checkbox to rename the usages of the function or the class in compiled JavaScript code.

Search for dynamic references

Select this checkbox to rename the dynamic usages of the symbol, for example, those of the type any.

Including dynamic usages in the refactoring may cause erroneous renaming as shown in the example below. Here changing test() to test1() in rename.test() is correct while in hello.test() it is an error.

A dynamic usage of a symbol is erroneously renamed
Search for references

This checkbox is only available for Rename File and Rename Directory refactoring.

  • Clear the checkbox to have PhpStorm rename only the file or folder itself without attempting to find its usages and update them accordingly.

  • Select this checkbox to have PhpStorm search for usages of the file/folder name and apply the refactoring to them.

Search in comments and stringsSelect this checkbox to have the changes applied to comments and strings.
Search for text occurrencesSelect this checkbox to have the changes applied to the documentation, HTML, and other files included in the project.
Rename accessorsThis option is only available for the Rename Field refactoring. Select this checkbox to rename the accessor and mutator methods (getters and setters) for the selected field.
Search in global scope

This option is only available for the Rename Private Field/ Rename Private Method refactoring.

  • If the checkbox is selected, PhpStorm will search for the private entity usages throughout the entire project. This can be useful in situations when a private entity is accessed from outside the class' scope, for example, by means of the property_exists() or a similar function.

  • If the checkbox is cleared, PhpStorm will search for the private entity usages only in the current class' scope.

By default, the checkbox is cleared.

Last modified: 22 March 2021