PHP find usages

Hi:

  I'm noticing a very weird behavior. When I right click over a method & try a find usages I get no ocurrencies found, though I see some usages myself... Is there something to be checked in the configuration? Thanks!

5 comments
Comment actions Permalink

Hi Mauro,

No, there is no special configuration options AFAIK.

Are those occurrences are in the same file, or different files? If second -- maybe that file is not part of the project.

Can you post a screenshot where it cannot find usage, or even a code sample (if you can) ?

0
Comment actions Permalink

Hi Andriy:

  I found both cases. Here I attach some screenshots of that behavior on the same file:

Find usages 1.png
Find usages 2.png
Find usages 3.png

0
Comment actions Permalink

Hi Mauro,

As I understand from screenshots, the method declared and used in the same class -- it should definitely find it -- I have tried different scenarios myself and it always worked well for me (unless ... unless this file is not part of the project (not in the folder defined in Settings | Directories) but rather included into project via External Library -- Settings | PHP; or ... maybe you have more than one class with the same name in your project -- PhpStorm may behave "strange" under such condition).

From 2nd screenshot I'm making assumption that you are using v1. Can you try the same in latest EAP build (it's like v2 beta -- http://confluence.jetbrains.net/display/WI/Web+IDE+EAP)? Because EAP builds are not guaranteed to be stable and settings may not be compatible with previous version, I strongly recommend to backup your ~/.WebIde10 folder, so you can revert back to using v1 in case EAP build will not work well for you. You will also need to use File | Invalidate Caches after launching new EAP build for a first time.

0
Comment actions Permalink

Hi:

  The file is found within the directory marked as content root in my settings. I don't think I have more than one class with this name... there might be many classes with the same method name though, but I guess that shouldn't bother right?

  I'll try the other version. Thanks!

0
Comment actions Permalink

Hi:

  I just tried the version you pointed at me and I found a strange behavior. On the search for the method I show earlier I had the same result. Now, when I searched for a method of a different class the ocurrence was found.

  BTW, another thing that's happening to me is that my project uses __autoload, and when I try to generate a phpUnit test case the IDE would say it can't find a superclass (though if I ctrl+click on it's name I go to the class definition just fine).

  Thanks

0

Please sign in to leave a comment.