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.
Summary: | Refactoring does not see names in the same file for refactoring | ||
---|---|---|---|
Product: | php | Reporter: | pbw <pbw> |
Component: | Refactoring | Assignee: | Ondrej Brejla <obrejla> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P1 | ||
Version: | 7.4 | ||
Hardware: | Macintosh | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Find usages before refactoring
Screen before executing refactor File after refactoring. |
Description
pbw
2013-10-27 06:39:29 UTC
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! |