php isn't auto completing

Hello,

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?

0
3 comments

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

i.e.

<?php


class myClass {
     /**
     /* @var IncludedClass
      */
     $classInstance


     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.

0
Avatar
Permanently deleted user

Do you know if this is correct behavior?

0

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.

0

Please sign in to leave a comment.