bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.57k stars 93 forks source link

Intelephense only index the opened file #2858

Closed willkerms closed 2 months ago

willkerms commented 2 months ago

Just installed vscode and intelephense, so i opened a workspace and open a class and everything out of the file was red saying not found or not declared.

Getting deeper i installed older versions of the intelephense but dindn't work, so open the logs of indexing, in there only was found the file open and the stubs files, none of the others files of the project was indexed.

Searching i see some issue in here and try it all and nothing, some people say to change file setting associations, others say to include the path in include path, nothing really work.

I don't know why it only find the file open, since the file open it's inside the project folder in a nested structed. So it finds the file that it's open but the others nothing.

VS Code: Version: 1.88.1 (system setup) Commit: e170252f762678dec6ca2cc69aba1570769a5d39 Date: 2024-04-10T17:41:02.734Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Windows_NT x64 10.0.22631

PHP Intelephense v1.10.4

image

willkerms commented 2 months ago

I'll post in here in case someone needs it.

Debugging real deeper, inspecting extension-host in vscode, cloning intelephense and so on I came to the conclusion that the problem was in VsCode with Git.

So some how, my git index had some issue that vscode couldn't read all files in project, even though all files appers in Ctrl + E (find files) in vscode.

After cloning the project in a new folder, everything starting working again.

So I don't know for sure what was the problem with vscode and git index, but some how it was corrupt and intelephense wasn't working because of that.

bmewburn commented 2 months ago

Glad you got it working!