I am using PHP-CS-Fixer and I have .php_cs.dist file in my workspace. It's something like this:
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
...
])
;
I have added file association:
"files.associations": {
".php_cs.dist": "php",
...
},
PHP-CS-Fixer is installed globally, so this library is not in my vendor directory, therefore intelephense shows an error when cursor is on PhpCsFixer\Config: Undefined type 'PhpCsFixer\Config'.intelephense(1009).
To get rid of this error, I have added intelephense.environment.includePaths entry:
"intelephense.environment.includePaths": [
"/Users/username/.composer/vendor/friendsofphp/php-cs-fixer/src"
],
Unfortunately it doesn't work (tried reloading window, reloading vscode, reindexing workspace). Error still occurs. Path is valid, class file exists, namespace is valid.
Everything is fine when PHP-CS-Fixer is installed internally (inside local vendor directory).
I am using PHP-CS-Fixer and I have
.php_cs.distfile in my workspace. It's something like this:I have added file association:
PHP-CS-Fixeris installed globally, so this library is not in myvendordirectory, thereforeintelephenseshows an error when cursor is onPhpCsFixer\Config:Undefined type 'PhpCsFixer\Config'.intelephense(1009).To get rid of this error, I have added
intelephense.environment.includePathsentry:Unfortunately it doesn't work (tried reloading window, reloading vscode, reindexing workspace). Error still occurs. Path is valid, class file exists, namespace is valid.
Everything is fine when
PHP-CS-Fixeris installed internally (inside localvendordirectory).