PHPUnit: Installing 3.4.0

Strangly enough the following command doesn’t install the latest version of phpunit for me.

$ pear channel-discover pear.phpunit.de
$ sudo pear install phpunit/PHPUnit

I am after 3.4.0 as phing absolutely/definitely wants that version for the whole thing to work. Here’s a quite note-to-self on how to get around that.

Download the latest package that needs to be installed from http://pear.phpunit.de/ and then run the command manually.

p@localhost:~/cfarm$ sudo pear install --alldeps PHPUnit-3.4.12.tgz
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
pear/Log can optionally use PHP extension "sqlite"
downloading Log-1.12.0.tgz ...
Starting to download Log-1.12.0.tgz (44,555 bytes)
............done: 44,555 bytes
downloading YAML-1.0.3.tgz ...
Starting to download YAML-1.0.3.tgz (9,794 bytes)
...done: 9,794 bytes
downloading DB-1.7.13.tgz ...
Starting to download DB-1.7.13.tgz (132,246 bytes)
...done: 132,246 bytes
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
...done: 119,790 bytes
downloading Mail-1.2.0.tgz ...
Starting to download Mail-1.2.0.tgz (23,214 bytes)
...done: 23,214 bytes
downloading Net_SMTP-1.4.2.tgz ...
Starting to download Net_SMTP-1.4.2.tgz (11,826 bytes)
...done: 11,826 bytes
downloading Net_Socket-1.0.9.tgz ...
Starting to download Net_Socket-1.0.9.tgz (5,173 bytes)
...done: 5,173 bytes
downloading Auth_SASL-1.0.4.tgz ...
Starting to download Auth_SASL-1.0.4.tgz (5,795 bytes)
...done: 5,795 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.12
install ok: channel://pear.php.net/Log-1.12.0
install ok: channel://pear.symfony-project.com/YAML-1.0.3
install ok: channel://pear.php.net/DB-1.7.13
install ok: channel://pear.php.net/MDB2-2.4.1
install ok: channel://pear.php.net/Mail-1.2.0
install ok: channel://pear.php.net/Net_Socket-1.0.9
install ok: channel://pear.php.net/Auth_SASL-1.0.4
install ok: channel://pear.php.net/Net_SMTP-1.4.2
....

About rp

Architect for large, highly scalable LAMP applications and Technical Manager with special focus on metrics based continuous improvement of teams and products. Rajat has close to a decade of experience of a very wide range of skills related to infrastructure, middleware, app servers all the way to front-end technologies and software development methodologies including agile, iterative waterfall, waterfall as well as ah-hoc startup using the right approach in the right context to reduce time to market.