Code completion not working right in Phpstorm 8

I am working in a Wordpress setup but I notcied this issue has nothing to do with this. I am coming from Phpstorm 7 and I still have 7 installed and this is not an issue.

If I have a function on a page like so....

if(class_exist('some_class'){

   function some_function(){
          return example;
   }

}


Then in Phpstorm 8 it will no find some_function() for code completion....it does not cache it to use. However in Phpstorm 7 it shows some_function() as a option in code completion.

Phpstorm 8 will only see and make it available in code completion if I remove the 'class_exist()' from the page.

function some_function(){
          return example;
   }

Then Phpstorm 8 makes this available for code completion.
Is there a setting that I am over looking?

9 comments
Comment actions Permalink

Is there a fix for this coming soon? Untill then I will be going back to vs 7.

0
Comment actions Permalink

No idea.

Ask devs in aforementioned ticket -- maybe they will give you some estimation.

0
Comment actions Permalink

I got the same problem with phpstorm8 when I developed a CodeIgniter project.
the function which defined under the "libraries"(in system or application) folder couldn't dispaly in the Code completion popup list.

0
Comment actions Permalink

Hi there,

Please provide at least some details:

  • how function is defined
  • what IDE version do you use (build number)
0
Comment actions Permalink

the function defined like this:
if ( ! function_exists('element'))
{
    function element($item, $array, $default = FALSE)
    {
        if ( ! isset($array[$item]) OR $array[$item] == "")
        {
            return $default;
        }

        return $array[$item];
    }
}

and use the CI framework  the function defined  under "helper" folder ( in Application or system).

0
Comment actions Permalink

You forgot to menton what IDE version do you use exactly...

The aforementioned http://youtrack.jetbrains.com/issue/WI-23442 ticket has already been fixed (8.0.2 final) -- users confirmed that it's working (just need to Invalidate Caches and restart IDE).

0
Comment actions Permalink

sorry,I already uninstalled it ,now I using 7.1.3
and I find the installer file name is PhpStorm-8.0.1

0
Comment actions Permalink

I test the8.0.2,and the problem is missing! Thank you!!!

0

Please sign in to leave a comment.