Autocomplete with class inheritance

when I create a class (A) which is inherited from another one (class A extends B), the autocomplete is good at recognizing the parent class' (B) methods/propperties. However if I create another class (C) which is a child class of the second class (C extends A) then the autocomplete does not work with class C. Only if all three classes are in the same file.
Is there any settings that might make it work?

1 comment
Comment actions Permalink

Hi Gabor,

Are all 3 classes are part of the project (directly in Settings | Directories or indirectly via external libraries in Settings | PHP) ?

Class names -- are they unique across whole project (I mean -- do you have like class C in your project folder + the same named class in one of the libraries) ?

Try to reproduce it on brand new empty project.

Here is my example/situation which works just fine:

   Component.php -- abstract class Component {...}
   Engine.php -- abstract class Cache_Engine extends Component {...}
   XCache.php -- class Cache_XCache extends Cache_Engine {...}

When working/editing inside Cache_XCache -- the autocompletion suggests all available class methods. The same when working outside (in "normal" php file that uses the above class).

Even 4-level inheritance works ok:

        Component.php -- abstract class Component {...}
        Abstract.php -- abstract class Payment_Abstract extends Component {...}
        SagePay.php -- class Payment_SagePay extends Payment_Abstract {...}
        SagePay.php -- class SagePay extends Payment_SagePay {...}

There were some tickets on Issue Tracker where people reported kind of similar issues (for example: WI-4443) but the reasons why it does not work/how it was solved were not reported back so it is still unclear what causing these issues.

I'm using latest EAP build (PS-102.18).


Please sign in to leave a comment.