I am trying to install code sniffer in my localhost but unable to install it.
System: Windows 10
PHP: PHP 5.4+
I have tried below methods.
- Open command prompt with administrative permissions (select “run as administrator “)
- Go to your php install directory. For example : \wamp\bin\php\php5.5.12
- Run this command "pear install PHP_CodeSniffer" OR "pear install --alldeps PHP_CodeSniffer"
Error:
D:\Projects\wamp\bin\php\php5.5.12>pear install PHP_CodeSniffer No releases available for package "pear.php.net/PHP_CodeSniffer" install failed
- Then run this command "pear clear-cache" and this also giving error like,
Error:
D:\Projects\wamp\bin\php\php5.5.12>pear clear-cache C:\Users\pcs9\AppData\Local\Temp\pear\cache does not exist or is not a directory
I have to use code sniffer "phpcs" and "phpcbf" but without install PHP_CodeSniffer its not worked.
Please help to resolve this error.
Thanks in advance!