vscode-php-cs-fixer
vscode-php-cs-fixer copied to clipboard
support multiple path of executablePath in config
Add a feature:
php-cs-fixer.executablePath
in the config could be a path list string with separator ;
, just like php-cs-fixer.config
.
For example, if php-cs-fixer.executablePath
or php-cs-fixer.executablePathWindows
is set to "${workspaceRoot}\\vendor\\bin\\php-cs-fixer.bat;D:\\.global\\vendor\\bin\\php-cs-fixer.bat;${extensionPath}\\php-cs-fixer.phar"
, then...
- First, it will check whether
${workspaceRoot}\\vendor\\bin\\php-cs-fixer.bat
exists, and use it if it exists. - If not exists, check whether
D:\\.global\\vendor\\bin\\php-cs-fixer.bat
exists, and use it if it exists. - If still not exists, check whether
${extensionPath}\\php-cs-fixer.phar
, and use it if it exists. - If all of them don't exists, it will show the error message as usual.
I think this could be useful, because some project has OWN php-cs-fixer
(such as v2.16.0 package + v2.16.0 .php_cs) under its folder, but some project may not, then it could do a fallback, use a GLOBAL php-cs-fixer
(such as v3.0.x-dev package + v3.0.x-dev .php_cs).
if settings like this, (most of people, me too) "executablePath": "php-cs-fixer.bat" can not check the file exist. php-cs-fixer.bat is in system envionment variables Path folder.
Okay, I've find the way to solve this problem and add some new features.
I'll push it and create a pull request soon.
Okay, I've find the way to solve this problem and add some new features.
I'll push it and create a pull request soon.
That's so sad, a part of new source code for new features was lost due to the auto-update of VS Code extension. (not all, lost about 25%)
Because I modify the files in .vscode\extensions\*
directly and didn't backup every change...
So I need to rewrite that again (If I still remember it).