Closed geoff-maddock closed 2 years ago
"php-cs-fixer.config": "/c/Users/geoff.maddock/PhpstormProjects/cadence/.php-cs-fixer.php"
.config not .configFile
Not sure what the deal exactly was there, but once I wiped out those extra settings, used the full path for both the executable and the config, and restarted ALL instances of vscode that I had open (I had three), it worked.
Thanks for a super useful extension!
I'm running VS Code using WSL1 Ubuntu (on Windows).
I've installed this extension into VS Code and specified the configurations in the settings:
Config File: ./.php-cs-fixer.php (it's in the root of my project) Executable: php-cs-fixer (this is installed locally) OnSave: checked Path Mode: override
When I open a file and hit save, I get a generic error: PHP-CS-FIXER: An error occurred
I opened up the Developer Tools, hit save again, and see the details of the command failing:
No, interestingly, you'll notice that it's not using the config file I specified. So in case it didn't like the non-full path, I specified the full path:
/c/Users/geoff.maddock/PhpstormProjects/cadence/.php-cs-fixer.php
I re-saved, and got the same error in the console, and the path was NOT updated to the value in the settings.
To dig a bit deeper, I opened up the User settings.json and found these keys were set for php-cs-fixer:
A bit stumped as to what is going on here - no matter what I set the config setting to, the error still says it cannot read ".php-cs-fixer"