bmewburn / vscode-intelephense

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

`Undefined type` when type is both defined and implemented correctly #2901

Closed MrSuddenJoy closed 2 weeks ago

MrSuddenJoy commented 3 weeks ago

Exactly this. When I create class that implements something and uses some other class/property, here is what I encounter: Zrzut ekranu 2024-06-12 o 20 52 39

bmewburn commented 3 weeks ago

If you do a text search for interface Arrayable is the file in your workspace? Have you tried reindexing? ctrl + shift + p -> Index workspace.

MrSuddenJoy commented 2 weeks ago

@bmewburn as of Arrayable: yes, its in separate file and this file is inside a workspace. As of reindexing: its underway currently. Will report back once its done.

MrSuddenJoy commented 2 weeks ago

@bmewburn reindexing have changed nothing. Any other ideas what may be wrong and how to fix it?

bmewburn commented 2 weeks ago

If the file is within the folder hierarchy you open in vscode it should get indexed and the symbols recognised. You could also check if you have excluded the file in files.exlude or check permission settings for file.

MrSuddenJoy commented 2 weeks ago

it should get indexed and the symbols recognised

@bmewburn thats what Ive been thinking........

After careful inspection I found that the file in question is inside an array of files.exclude. Removed it, restarted reindexation and now everything works as it should.

@bmewburn Thank you for assistance 👍🏻 Appreciate.