If you need an easy and quick way to install your PHP QA tools, you can use the next bash snippet.
# Install composer based tools
cat > ~/.composer/composer.json <<EOF
{
"require": {
"halleck45/phpmetrics": "@dev",
"squizlabs/php_codesniffer": "*",
"phpunit/phpunit": "*",
"sebastian/phpcpd": "*",
"sebastian/phpdcd": "*",
"phpmd/phpmd" : "@stable",
"pdepend/pdepend" : "@stable",
"phploc/phploc": "*",
"sebastian/hhvm-wrapper": "*",
"theseer/phpdox": "*"
}
}
EOF
curl -sS https://getcomposer.org/installer | sudo php -- \
--install-dir=/usr/local/bin --filename=composer
/usr/local/bin/composer global install
chown -R $SUDO_USER.$SUDO_USER ~/.composerAnd all your required tools (phpunit, phploc, phpmd, pdepend, …) are now located at ~/.composer/vendor/bin, so set your $PATH environment variable to include it.
If you find it useful please share it.
Setting up Jenkins in Ubuntu Precise 12.04 for PHP projects
Every step to turn an Ubuntu 12.04 box into a Jenkins continuous integration server for PHP projects.
Speed up PHP linting with xargs
Parallelising PHP lint with xargs so the linting step stops dominating build time on a large project in Jenkins.
Simplified version of my PHP test runner
A PHP continuous test runner rewritten to depend only on inotifywait, replacing the earlier Ruby and Watchr version.