问题
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
回答1:
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.
Current workaround:
- Close IDE
- Locate folder where PhpStorm 2020.2 stores indexes/caches on your computer (see below)
- Delete that folder (as standard "Invalidate caches" does not help here)
- Launch IDE
Typical locations for caches folder for different OS:
- Windows:
%USERPROFILE%\AppData\Local\JetBrains\PhpStorm2020.2\caches
- Linux:
~/.cache/JetBrains/PhpStorm2020.2/caches
- macOS:
~/Library/Caches/JetBrains/PhpStorm2020.2/caches
来源:https://stackoverflow.com/questions/64070619/phpstorm-2020-2-php-built-in-functions-are-not-recognized