Intelephense show error like "unknown type" and "unknown function", but I have no clue how to fix them.
My project (a TYPO3 composer installation) has a "public" folder, which is, why I configured intelephense's intelephense.environment.documentRoot
option accordingly by setting it to ./public
.
The first screenshot shows the page tree of the project with a section opened, where the error occurs.
When I open "function.php", intelephense informs me about a "Undefined type 'Aimeos\Map'":
Map is defined right next to the function.php file in Map and ooks like this:
There are other places in the code, where intelephense informs me about a "Undefined function 'map'":
I had a look at intelephense's "function" template, but I do not know, what to put there. Neither, if I also have to define a class template and/or anything else.
This is my VSCode configuration for intelephense:
As can be seen, I tried to exclude "vendor/aimeos" files using the negator "!", but I assume this is not a known configuration value within intelephense.
What do I have to do to make intelephense work correctly? Thank you!