This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When I'm editing a PHP script, like a controller script, that isn't a class object, the code refactoring is disabled. For example, I open a PHP file, highlight a variable that is used several times throughout the script, and then go to the main Refactor menu and everything is disabled.
I believe this was already requested, but I cannot find the existing issue.
reassigning to default owner
batch reassigning
I renamed the bug since its title has nothing to do with the issue. Still, when I do a Ctrl+R a variable to refactor something in a non-class PHP file, I get the refactoring popup, and when I do the preview, it seems to work and rename the variable. So this seems to be fixed in NB 8.2 But I believe this way of working (with global variables) is very hazardous when it comes to refactor and rename variables (it would be renamed across different templates, even non-related ones)