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: | Method renaming doesn't cover parent calls | ||
---|---|---|---|
Product: | php | Reporter: | dagguh |
Component: | Refactoring | Assignee: | Ondrej Brejla <obrejla> |
Status: | NEW --- | ||
Severity: | normal | CC: | andyr_it, ppisl, squarestar |
Priority: | P3 | ||
Version: | 7.0.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
dagguh
2011-10-24 16:05:26 UTC
I'm not sure if it should be implemented. parent::foo() is not the exact usage of of your protected function foo() {}...P4 for me. I'm applying rename refactor on the parent. I expect all calls to this method and all overrides to be renamed too. PS. To clear things up: this is not a static method I know that it's not a static call and method, I just didn't know that you apply rename to parent function (it wasn't clear from your report). So: <?php class Mother { protected function foo() {} // Here you apply rename? } class Child extends Mother { protected function foo() { parent::foo(); } } ?> What is your result of this example and what you expect? Or do you apply rename elsewhere? Thanks for your coop! Initial code: <? class Mother { // parent declaration protected function foo() {} } class Child extends Mother { // child override protected function foo() { // call to parent parent::foo(); } } ?> Case A - rename at parent declaration: <? class Mother { protected function bar() {} } class Child extends Mother { protected function bar() { parent::foo(); } } ?> Case B - rename at child override: <? class Mother { protected function foo() {} } class Child extends Mother { protected function bar() { parent::foo(); } } ?> Case C - rename at call to parent: <? class Mother { protected function bar() {} } class Child extends Mother { protected function bar() { parent::foo(); } } ?> Clearly cases A and C are bugged. Case B is debatable. Now it's clear, thanks. *** Bug 196765 has been marked as a duplicate of this bug. *** Still reproducible in NetBeans IDE Dev (Build 201208240001) *** Bug 242762 has been marked as a duplicate of this bug. *** *** Bug 245143 has been marked as a duplicate of this bug. *** |