phpcs: Unable to locate phpcs. Invalid version string encountered!
See original GitHub issuemac system
install phpcs via composer global require squizlabs/php_codesniffer
open vscode
installed phpcs extention
config it
exepath /Users/usernama/.composer/vendor/squizlabs/php_codesniffer/bin/phpcs
show that
phpcs: Unable to locate phpcs. Invalid version string encountered!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Unable to locate phpcs. Invalid version string encountered! #115
I am using phpcs 3.5 but you should try this too no matter the version. Really, this issue (of phpcs running in the...
Read more >Visual Studio Code: Unable to locate phpcs - Stack Overflow
So, to fix this: First, run the command phpcs --version and check if the command does not print any warning or error before...
Read more >[SOLVED] Unable to locate phpcs. Please add ... - Robert Askam
Restart your Visual Studio Code and you should now not get the error: phpcs: Unable to locate phpcs. Please add phpcs to your...
Read more >unable to locate phpcs. invalid version string encountered!
Plugin Installation. Open Visual Studio Code. Press Ctrl+P on Windows or Cmd+P on Mac to open the Quick Open dialog. Type ext install...
Read more >Unable to locate phpcs. Invalid version string encountered!
phpcs : Unable to locate phpcs. Invalid version string encountered! ... install phpcs via composer global require squizlabs/php_codesniffer.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have solved it via install PHP CodeSniffe on my system
https://www.jianshu.com/p/8c16b1f247ed
In my case, I’m getting this error because of a PHP deprecation notice that is output when
phpcs --version
is run. The regex expects the output of that command to start withPHP_CodeSniffer version
, followed by the version number, but the deprecation notice is printed before that, causing the version to not be matched.