vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

intelephense not indexing any files

Open some0ne2 opened this issue 3 years ago • 3 comments

Intelephense is not indexing any files inside my project.

"intelephense.telemetry.enabled": false,
"intelephense.files.maxSize": 100000000,
"intelephense.maxMemory": 512,
"intelephense.diagnostics.implementationErrors": false,
"intelephense.files.associations": [
    "*.php",
    "*.phtml"
]`

Output from intelephense window:

[Info - 19:38:25] Initialising intelephense 1.8.2 [Info - 19:38:25] Reading state from /home/someuser/.config/Code - OSS/User/workspaceStorage/f9a4abeeec506a0a81f82ea0ac81fa37/bmewburn.vscode-intelephense-client/10abaa58. [Info - 19:38:25] Initialised in 41 ms [Info - 19:38:26] Environment changed. Refreshing 2 in memory documents. [Info - 19:38:26] Searching file:///home/someuser/.vscode-oss/extensions/bmewburn.vscode-intelephense-client-1.8.2/node_modules/intelephense/lib/stub for files to index. [Info - 19:38:26] Searching file:///run/user/1000/gvfs/nfs%3Ahost%3D192.168.56.101%2Cprefix%3D%252Fvar%252Fwww%252Fhtml/project1 for files to index.

Files are normal .php ending files (laravel project). What I tried already:

  • I've already tried to let VSCode opened around 15 minutes, but no further output occured.
  • Tried to stop the the indexing Intelephense Cancel indexing
  • Tried to (re)start the the indexing Intelephense Index workspace

Thanks for any help on how to debug further!

some0ne2 avatar Jul 04 '22 17:07 some0ne2

I'm not sure if this is part of it, but I'd guess so. Since a few days, every class of my composer packages are marked red. "undefined type PackageName\Class intelephense 1009"

Packages of course are installed and they work but intelephense doesn't recognize them.

Bildschirmfoto 2022-07-05 um 14 30 50

sven-ahrens avatar Jul 05 '22 12:07 sven-ahrens

I have the same issue, my vendor folder isn't getting indexed. :(


Edit: Found a temporary workaround:

I found out that my main vendor folder wasn't being displayed in my workspace sidebar. Another project where indexing still works does show the vendor folder but grayed out. When I manually added 'vendor' to the include paths. The vendor folder is located the same level where my workspace lives. the indexing process ran again and the references where working again.

Levdbas avatar Jul 06 '22 07:07 Levdbas

I'm not sure if this is part of it, but I'd guess so. Since a few days, every class of my composer packages are marked red. "undefined type PackageName\Class intelephense 1009"

Packages of course are installed and they work but intelephense doesn't recognize them.

Bildschirmfoto 2022-07-05 um 14 30 50

Hi, I refer to this VsCode composer psr-4 autoload of external libraries does not perform code completion and it works!

This is my solution.

  1. Set intelephense.environment.includePaths image

  2. Execute intelephense: Index Workspace image

gofunz avatar Sep 02 '22 06:09 gofunz

For those who would like indexing from a folder that is not in your working folder, just add that folder to the includedPaths:

image

KeremArdicli avatar Feb 23 '23 10:02 KeremArdicli

@KeremArdicli Thank you so much, I was struggling with this problem for months

rogazth avatar Apr 27 '23 14:04 rogazth