PhpStorm 2023.2 Help

Rename dialogs

Refactor | Rename

Shift+F6

Item

Description

Rename <symbol name> and its usages to

In 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.

interface myInt { target: string } function onClick(e: any) { console.log(e.target); }
interface myInt { myTarget: string } function onClick(e: any) { console.log(e.myTarget); }

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 strings

Select this checkbox to have the changes applied to comments and strings.

Search for text occurrences

Select this checkbox to have the changes applied to the documentation, HTML, and other files included in the project.

Rename only variables from closest scope

This checkbox is only available when renaming variables in for and foreach loops and catch blocks. If selected, PhpStorm will only rename the variables within the closest scope, that is, the current loop or block. Otherwise, it will rename the variables within all applicable scopes.

Rename accessors

This 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: 23 August 2023