PhpStorm isn't recognising core PHP. For example, it's not recognising Exception
, with the tooltip saying "Undefined class 'Exception'".
I've tried invalidating the cache to no avail. I've checked a colleague's installation and they appear to have no issues, and after Ctrl+Clicking
on their Exception
class, it links correctly to Core_c.php
, which isn't the case for me. It seems like my PhpStorm isn't picking up the PHP plugin / library, and I have no idea why.
I've tried reinstalling PhpStorm to the latest version, upgrading all of my packages. I've even made sure that the php.jar plugin is actually there, and it is:
/opt/phpstorm/plugins/php/lib/php.jar
And the PHP plugin is enabled in PhpStorm.
Another problem I have with PhpStorm is that it isn't suggesting function names whenever I type them. Help would be appreciated, and I can provide additional information if needed.
In case that same issue appears for PhpStorm 2020.1 or later, that's a previously reported issue and invalidating caches won't help anymore.
As described here the solution is:
Typical locations for caches folder for different OS:
%USERPROFILE%\AppData\Local\JetBrains\PhpStorm2020.2\caches
~/.cache/JetBrains/PhpStorm2020.2/caches
~/Library/Caches/JetBrains/PhpStorm2020.2/caches
https://youtrack.jetbrains.com/issue/WI-54626
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With