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.
Product Version = NetBeans IDE 7.4 (Build 201310111528) Operating System = Mac OS X version 10.8.5 running on x86_64 Java; VM; Vendor = 1.7.0_40 Runtime = Java HotSpot(TM) 64-Bit Server VM 24.0-b56 The same problem affects Find, so it's not surprising that refactoring doesn't see them either. Will attach screenshots showing a function definition with a single use in the following function. Refactoring screen does not see the usage, and after refactoring, the usage is unchanged.
Created attachment 141589 [details] Find usages before refactoring
Created attachment 141590 [details] Screen before executing refactor
Created attachment 141591 [details] File after refactoring.
My initial reference to Find should be Find usages.
It works properly. You try to refactor static function which have to be used with self:: static:: ClassName:: prefix. Calling just a method name calls global function. This fails with fatal error: <?php class TstCls { public static function staticFoo() { return "Wrong"; } public static function staticBar() { echo staticFoo(); } } TstCls::staticBar(); ?> This works and refacoring works as well: <?php class TstCls { public static function staticFoo() { return "Wrong"; } public static function staticBar() { echo self::staticFoo(); } } TstCls::staticBar(); ?>
Thanks for the PHP lesson!