I downloaded and installed PHP CS Fixer extension for VSCode (by junstyle) and the official php-cs-fixer-v2.phar file from https://github.com/FriendsOfPHP/PHP-CS-Fixer. I created a file named config.php-cs and pasted the reference config code in it :
return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'array_indentation' => true,
....
I placed both those files in C:\wamp64\www\configuration_php\
Here is my settings.json
{
"workbench.iconTheme": "file-icons",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"editor.formatOnPaste": true,
"workbench.colorTheme": "One Dark Pro",
"editor.fontLigatures": true,
"editor.lineHeight": 22,
"files.trimTrailingWhitespace": true,
"editor.fontWeight": "400",
"editor.renderWhitespace": "all",
"editor.tabSize": 2,
"editor.cursorStyle": "line",
"editor.insertSpaces": false,
"prettier.useTabs": true,
"terminal.integrated.fontSize": 15,
"javascript.validate.enable": false,
"editor.formatOnSave": true,
"files.autoSave": "off",
"window.zoomLevel": 0,
"editor.fontFamily": "JetBrains Mono, Consolas, 'Courier New', monospace",
"editor.cursorBlinking": "smooth",
"editor.formatOnSaveTimeout": 5000,
"php-cs-fixer.executablePath": "C:\\wamp64\\www\\configuration_php\\php-cs-fixer-v2.phar",
"php-cs-fixer.config": "C:\\wamp64\\www\\configuration_php\\config.php_cs",
"php-cs-fixer.onsave": true,
}
I can tell my editor considers the executablePath because if I put a mistake in the path, I get an error message. The problem is for the config path. VSCode seems to be ignoring it completely and won't use the config file or raise any error if I introduce mistakes in the path or in the file content.
Am I missing something ?