Reputation: 4166
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.
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
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!
Upvotes: 3
Views: 2594
Reputation: 24280
PEAR is not the best way to install PHP packages nowadays.
You could try Composer:
composer require squizlabs/php_codesniffer --dev
Upvotes: 1