4

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"

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
doublejosh
  • 5,548
  • 4
  • 39
  • 45
  • Presumably this can be solved over here: http://stackoverflow.com/questions/4981134/pear-install-for-macports-php5 – doublejosh Feb 27 '12 at 20:05

3 Answers3

5

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

Ragnarokkr
  • 2,328
  • 2
  • 21
  • 31
2

Just needed to update my php.ini for include_path = ".:/opt/local/lib/php"

doublejosh
  • 5,548
  • 4
  • 39
  • 45
0

I used the following command and it worked:

sudo pear install PHP_CodeSniffer
Zhang Buzz
  • 10,420
  • 6
  • 38
  • 47