Recommended method for Testing the Plugin
This is the installation method recommended for your initial tests with the plugin because it requires the least effort.
Since version 1.2, all the external tools (PHP Depend, PHPMD, etc.) used by the plugin are shipped with it.
Versions of the external tools embedded as PHAR in the plugin:
Note that you will not be able to run the computation of coverage by unit tests, but only reuse existing reports, with this installation mode.
Recommended method for Production Environments
This is the recommended installation method for production environments because you can install your own version of each external tool.
You have to be logged in as an administrator to run the commands below.
- Install PHP. You can download PHP at this location or this one and follow the instructions to install it.
Install PEAR. To ensure PEAR version and to upgrade it, type the following commands in command prompt:
If for some reasons you need the latest PEAR and the commands above don't retrieve it, you can download http://pear.php.net/go-pear.phar and execute it with php (don't use the old go-pear without the .phar extension, it will likely fail):
Install PHPUnit from pear using the following command lines:
- Install XDebug to allow code instrumentation used by PHP Unit to compute coverage.
If you are running a Linux or Mac OS, you must install phpize and php headers (normally found in php dev packages) and then compile xdebug via pecl:
Another example on Fedora 18:
And then edit your $PHP_HOME/php.ini file to add the following line:
If you are running Windows, you should download the binary version matching your PHP installation from this location. And then edit your $PHP_HOME/php.ini file to add the following line:
Install PHP Depend: