Restrict Renaming a Variable to only a the current file

Sometimes PHPStorm will look throughout my project for a variable name and try to change it everywhere (using F2 to rename a variable). I'd like to only change it locally within the current file. Is there an easyway to do this without opting out of all files presented when prompted?

2 comments
Comment actions Permalink

Please try Refactor > Rename with "Search for references" disabled: https://www.jetbrains.com/phpstorm/help/rename-dialogs.html

0
Comment actions Permalink

Hi Liubov,

Thanks for the reply.

The docs you link to state this doesn't work for variables, but I tried it anyway with no luck.

"                                 This check box is only available for Rename File and Rename Directory refactoring."

0

Please sign in to leave a comment.