php isn't auto completing


I'm using Intellij IDEA 12.1.4 and for whatever reason in new php files it doesn't autocomplete. I imported a PHP class (it sees the file is there) but when I instantiate an instance it doesn't seem to know the class.

Is there something I'm not configuring properly?

Comment actions Permalink

I've seen the same behavior as well. What has helped me is to use documentation notation when I run into that.



class myClass {
     /* @var IncludedClass

     function __construct($newClass) {
          $this->classInstance = $newClass

That usually allows it to pick it up rightway. I know it's not ideal, but it seems to work pretty good, and it's good practice anyway.

Comment actions Permalink

Do you know if this is correct behavior?

Comment actions Permalink

I don't, but it keeps me working. I don't actually mind it because all developers, including myself, usually need encouragement to document their code better. :) I'm sorry I don't have a better answer.


Please sign in to leave a comment.