One of the major problems we identified with our build workflow were the many dependencies to different qa-tools. So in case of we want to run PHPUnit, we had to ensure that on every system which runs the workflow, PEAR and PHPUnit have to be installed. Different versions of the tools do not make this problem easier...
We tried to enforce people to install the needed qa-tools on every system the build-workflow runs, but keeping all the systems up to date and the build running for over 20 Developers on different machines took to much time.
We tried to run kind of a "bundled dependency manager" which downloads PEAR and installs it in a project subdirectory. After that, we installed all the tools needed via the recently downloaded PEAR installer. Theoretically, that worked really well, but there were too much problems with installation locations, file permissions, version differences and the build took four times longer to install all the PEAR stuff as we needed to run the tests and metrics.
Our final solution was to install the dependent tools using composer. There are many advantages in using this packet manager to install the qa-tools:
- No dependencies on the systems which execute the ant tasks
- Automated setup for the qa-tools
- Centralized bin directory
- Locking for tool versions, so everyone use the same version of the tools
All we had to do, was adding a "require-dev":{}
section to our existing composer configuration and changeing the build-targets to the vendor/bin/
directory from composer.