简体   繁体   中英

Installing PHP PEAR code sniffer (mac)

Attempting to install the PHP PEAR code sniffer extension on a mac (after installing Mac Ports) to no avail. Ultimate goal is Drupal code sniffing in Komodo somewhat via these instructions... http://blog.8bitplateau.net/drupa-code-sniffer-komodo/

Command:

pear install PHP_CodeSniffer

Error:

No releases available for package "pear.php.net/PHP_CodeSniffer"

After downloading:

pear channel-discover pear.phpunit.de

I was getting package unavailable when tyring to install the package. My answer, working in Windows, from the command prompt type:

pear clear-cache

then type:

pear install phpunit/PHPUnit

job done, if you clear the cache after every installation, any further install goes without a hitch. ENjoy

只需更新我的php.ini for include_path = ".:/opt/local/lib/php"

我使用以下命令,它工作:

sudo pear install PHP_CodeSniffer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM