I know this has been asked many times but I can't find an answer that works for me. I'm on a Mac running macOS 10.15.6 and I'm getting the issue of Unable to locate phpcs in VSCode version 1.47.3. The actual error is:
phpcs: Unable to locate phpcs. Command failed: "/Users/mat/.composer/vendor/bin/phpcs" --version
If I run /Users/mat/.composer/vendor/bin/phpcs --version
in my terminal I get the correct response and if I do which phpcs
I get the desired /Users/mat/.composer/vendor/bin/phpcs.
When I switch the VSCode extension works as it should but then when I close and reopen VSCode I get the error, which is solved again if I switch extensions.
My VSCode settings are:
"phpcs.enable": true,
"php.validate.executablePath": "/Users/mat/.composer/vendor/bin/phpcs",
"phpcs.executablePath": "/Users/mat/.composer/vendor/bin/phpcs",
"phpcs.standard": "PSR12",
I've really been unable to figure out why this error keeps happening when I launch VSCode. Any help would be greatly appricated.
Thanks