PhpStorm code completion doesn't show core classes/extensions

倾然丶 夕夏残阳落幕 提交于 2019-12-18 10:59:20

问题


I'm having trouble with PHPStorm. I just started new project created a couple of my own classes, in one of them I created PDO object.

$this->cnn = new PDO("sqlite:db/base.db");

Now when I want to see what kind of methods this object has via crtl + whitespace, I get no suggestions. Then I tried to see the list of classes available to me with.

$newClass = new

And when I pressed ctrl + whitespace it only showed me the classes I created.

So the question is, what do i need to do, to make PhpStorm see all the classes that are available (not just the ones i created).

P.S. when i ctrl + click on PDO (which is underlined) it says that class is undefined

P.P.S. in project settings i have selected php 5.4 language language and selected interpreter (php 5.4.7, using xampp)


回答1:


I've solved the issue. File > Invalidate Caches did the trick!




回答2:


I had a problem with PHPStorm Code Analysis hanging up (never finishing) on certain files using certain classes. No errors were reported, but all code completion was not working in these problem files.

The solution was the same, File > Invalidate Caches.



来源:https://stackoverflow.com/questions/14727557/phpstorm-code-completion-doesnt-show-core-classes-extensions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!