Find Usages of a File in Project

Right-clicking a project file in the Project window, and choosing Find Usages or using the keyboard command for Find Usages, does not yield nearly all usages of the file within the Project Scope.

For example, Find Usages of the file includes/admin_x.php yields only three results, while Find in Path on the string "includes/admin_x.php" yields the true number of usages of the file, 21.

What is the issue?
Thanks, Fritz

1 comment
Comment actions Permalink

Adding a related issue here.

Selecting the same file and selecting Refactor > Move, then selecting a new directory location for the file and checking Search for references and clicking Okay results in the file being moved and the message "3 occurences found" at the bottom of the PHPStorm window.

Again, this is incorrect because there are actually 21 usages of the file in the project, all of which are in identical require_once('includes/admin_x.php") statements.

Furthermore, none of the actual usages/occurences were updated by the Move Refactor.

At this point, I'm losing faith in the Refactoring capabilities. Am I doing something wrong?

PS - I'm in 7.1.3.

Thanks, Fritz

ADDITION: More info here. I tried a Rename Refactor on the same file, and 21 usages were correctly updated. Now, if I try a Find Usages on the newly renamed file, I still only get 3 results out of 21 true results.

Message was edited by: Fritz Green

0

Please sign in to leave a comment.