记录下php集成环境中若干个工具的安装步骤和过程:

安装pear

wget http://pear.php.net/go-pear.phar
$ php go-pear.phar

使用:pear install <要安装的pear程序包>

安装phpunit

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
sudo pear install phpunit/PHPUnit

安装phpmd

PHP mess detector:http://phpmd.org/,用来做基于pdepend的结果分析用工具:

<span style="font-size:14px;">pear channel-discover pear.phpmd.org
pear channel-discover pear.pdepend.org
pear install --alldeps phpmd/PHP_PMD</span>

安装phpcpd

(PHP copy paste detector:https://github.com/sebastianbergmann/phpcpd),用来发现项目中反复的代码工具:

<span style="font-size:14px;">pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear install phpunit/phpcpd</span>



安装phpdcd

(PHP dead code detector:https://github.com/sebastianbergmann/phpdcd)。用于发现项目中没有引用使用的代码:

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear install phpunit/phpdcd-beta

使用:phpdcd --exclude /data/wwwroot/payapi/system/lib/  /data/wwwroot/payapi

05-22 14:46