I just installed PhpStorm 2020.2, and notice that all php base classes like Closure or mysqli are not been identified by the IDE.
Looking at the left where the PHP base files are, it just show the folders, like you can see in the first image, on the other hand, my older PhpStorm 2017 has the folders with the files inside it and cant identify all php base classes
PhpStorm 2020.2
PhpStorm 2017
It's a known issue. AFAIK there is still no solid idea on why it happens and why only some users are affected.
https://youtrack.jetbrains.com/issue/WI-54626 -- watch this ticket (star/vote/comment) to get notified on any progress. Fixed in PhpStorm 2021.1.1 version.
Current workaround:
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
For 2021.1 version: use File | Invalidate Caches...
-- it now better clears them so no need to delete such folders manually.
File | Invalidate Caches...
Invalidate and Restart
button thereIf the issue persists (i.e. comes back the next day / after restart) then it's a different cause and you will have to wait for 2021.1.1 build.
Before doing all that @lazyone has said 👌, make sure that the Phpstorm php interpreter is set correctly. You can check that from here:
File/settings/languages & frameworks/php/
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