0

I created a class like this:

class FOO {

        public function __construct(){}

        public function getArr(){}

}

$x=new FOO(); //don't show "FOO" suggestions
$x-> //don't show suggestions

The problem is that PhpStorm doesn't show me the suggestions to my class in the "new" statement and if I create in instance of FOO it doesn't show me the FOO methods...

I don't know if it is a problem of PhpStorm; I have imported the Facebook php sdk class and it give the correct hints to me...

UPDATE:

I think I have found the problem:

-if I have opened a project and I import the file with the class (that is outside from the project directory, drag & drop into the IDE) to quick edit it, the IDE don't give me the suggestions

-instead, if I open the single file Itself and have no others projects opened the IDE works correct

Francesco
  • 555
  • 4
  • 23
  • 1) Please try `File | Invalidate Caches...` and restart IDE. Any better? 2) If you give it another name (e.g. `Foo2`) -- will it do any different? 3) If still nothing -- please post screenhots (of the whole IDE window) where such problem exists. – LazyOne Nov 24 '15 at 14:50
  • I just testet - it does. Did you start your file with " – Fuzzzzel Nov 24 '15 at 14:52
  • I have updated the post @LazyOne – Francesco Nov 24 '15 at 14:59
  • 1
    @Francesco Yes -- that's expected behaviour (limitation(?) of their system). The file MUST be inside the project to have code completion properly working there. – LazyOne Nov 24 '15 at 15:17

1 Answers1

0

Thanks to @LazyOne, the answer is that the behavior is correct from the moment that I opened the file from outsite the project where I were working on.

if I have opened a project and I import the file with the class (that is outside from the project directory, drag & drop into the IDE) to quick edit it, the IDE don't give me the suggestions


Yes -- that's expected behaviour (limitation(?) of their system). The file MUST be inside the project to have code completion properly working there.

Francesco
  • 555
  • 4
  • 23