I also support a bunch of ZF1 applications, and I also have to deal with PHPUnit version 3.4.15 for our tests, but we took a different approach: we removed PHPUnit via a pear and downloaded the source code from PHPUnit git repo, then we create a phar package that will we then symbolize in the / usr / bin directory as an executable file.
I have phpunit-3.4.15 working side by side with PHPUnit installed by PEAR, but if you do not need a higher version, you can completely remove the PEAR package.
$ sudo pear uninstall phpunit/PHPUnit
If you use phing, you need to force ping to ignore PHPUnit dependencies.
The approach for old PHPUnit as a phar package is as follows:
$ cd /tmp $ curl -o phpunit-3.4.15.tar.gz https://codeload.github.com/sebastianbergmann/phpunit/tar.gz/3.4.15 $ tar -xvzf phpunit-3.4.15.tar.gz $ cd phpunit-3.4.15/ $ /usr/bin/php make_phar.php $ sudo ln -s /tmp/phpunit-3.4.15/phpunit.phar /usr/bin/phpunit34
PHP Settings Since we are tricking the system a bit, we need to add some things to our php.ini configuration.
- in php.ini: phar.readonly = Off
- in php.ini: include_path = ".: / path / to / pear: /tmp/phpunit-3.4.15"
source share