Error adding CodeSniffer to PHPStorm "@php_bin@" is not recognized as an internal or external command, operable program
Answered
I'm trying to add Code Sniffer to my PHPStorm, but I am receiving weird errors when I press "Validate"!
First, my error was: "@php_bin@" is not recognized as an internal or external command, operable program
So, I went into the phpcs.bat file and changed @php_bin@ to "C:\PHP7\php.exe"
And after, I got another error:
http://i.imgur.com/vg4v4xz.png
So I'm pretty stuck and not sure what to do!
For reference, I am running Win10 and my PHP is path'd correctly on the system. I installed CodeSniffer via Composer and it seems to work via command line.
Any ideas? I can't figure it out!
Please sign in to leave a comment.
Hello,
Were you able to sort this out?
Could you reproduce the issue and then check the messages in Help > Show Log in Explorer > idea.log file, please?
I figured it out after several hours.
I needed to edit the @php_bin@ in the .bat file with the dir pointing to php-win.exe instead of php.exe .. how strange.
Hello,
I have the same problem, receiving this error message, when I am trying to use code sniffer in phpstorm
phpcs: '"@php_bin@"' is not recognized as an internal or external command,
operable program or batch file.
Exclude register.php from PHP Code Sniffer analysis.
I see that I should edit some file, but I cannot figure out what I should edit.
Thanks!