John Davidson

visual studio code - VSCode PHP Intelephense doesn't detect my libraries

0 comments
Message:


I'm switching from PhpStorm to VSCode for my PHP development and I have a problem: For my multi-root workspace, it only detects the classes from the current repository, not all the other repos and libraries from my project. For example, when trying to autocomplete a class, Go to Definition, etc.


I'm developing a TYPO3 project, using composer. Therefore, the structure of the nested projects is this one:


path-to-html/
path-to-html/public/typo3conf/ext/{extension1, extension2, etc.}

I've installed the VSCode PHP Intelephense extension and configured it according to its description. But, as I've said, I only get completion for symbols of the current repository, not of all the libraries of the TYPO3 project. How should I configure this?


I've read all the Intelephense options and I've tried setting these ones:


    "settings": {
...
"intelephense.environment.documentRoot": "/path-to-html",
"intelephense.environment.includePaths": [
"/path-to-html/public/typo3conf/ext/extension_1",
...
]
}

But it still doesn't work.



My Answer:
VSCode PHP Intelephense is a popular extension for Visual Studio Code that provides intelligent code completion, code navigation, and other features for PHP development. It offers advanced code analysis and suggestions to help developers write better code faster. Intelephense also supports PHPDoc comments, allowing for better documentation and understanding of code. Overall, it is a valuable tool for PHP developers working in Visual Studio Code.

Rate this post

5 of 5 based on 8047 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us