junstyle / vscode-php-cs-fixer

PHP CS Fixer extension for VS Code
https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer
MIT License
357 stars 45 forks source link

How to force the extension to use the locally installed `php-cs-fixer` from the project (`executablePath`) instead of the default one ? #205

Open Alexandre-Fernandez opened 1 year ago

Alexandre-Fernandez commented 1 year ago

I installed php-cs-fixer locally and added some extensions. This extension reads the config file, sees the extensions and throws because it can't import them. This happens because it's not using the php-cs-fixer from the project. When I change my VSCode setting and change the executablePath to an absolute path to the project php-cs-fixer vendor executable it works again.

EDIT: The executable path that doesn't work is "php-cs-fixer.executablePath": "${extensionPath}/php-cs-fixer.phar".

junstyle commented 1 year ago

yes. Cantor read the path of the php-cs-fixer that you install in the project. you must supply the path