0
votes

I saw many different questions here, but nothing was helpful to me. I have no trouble with an interpreter, I tried to reset PhpStorm's cache.

It looks like file functions.php isn't accessible.

enter image description here

I really don't want to make a total reset. Maybe somebody has an idea how to solve it?

1
Are you sure that path to php interpreter is set in IDE? - Den Kison
What do the tooltips say when you hover over those yellow parts? - Jeto
@Jeto nothing shown - zhartaunik
If you go to File | Settings | Editor | File Types, can you make sure that the *.php extension is present in the PHP section? - Jeto
@Jeto this is fine because my file visually looks like PHP, but not as plain text. - zhartaunik

1 Answers

1
votes

I'm not sure what I actually did and how to reproduce this issue again, but now it works well. I took previous version of PHPstorm. When I installed new one, the previous one was simply renamed to sth like 'phpstorm2'.

Here are my thoughts what actually happened:

As I understand for highlighting is responsible that part of application which is managed under Languages & Frameworks / PHP / PHP Runtime.

To reproduce this issue you may try to disable there "Core / Core" and try to write down in any place of your phpfile following:

\Exception::class();

And in your case this class will not be highlighted, as it presents in Core_c.php. In my case it is placed in

/opt/phpstorm/plugins/php/lib/php.jar!/stubs/Core/Core_c.php

Phpstorm Core_c.php

I'm 100% sure that these libs were always enabled, but why I didn't saw this - that is the question.

So if I face this issue again my steps would be:

  1. Try to verify Languages & Frameworks / PHP / PHP Runtime. The better way would be to enable ALL libs.
  2. Check External Libraries in the project tree. Check read privileges for /opt/phpstorm/plugins/php/lib/php.jar and probably reinstall this plugin.
  3. Try to find out function which I don't actually see in External Libraries.