Updating PHPUnit

fail whale by Yinying Lu http://www.yinyinglu.com/I recently updated my Ubuntu VM to 11.04, and PHPUnit stopped working.

This is the error that I was getting.

PHP Warning:  require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 38
PHP Fatal error:  require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/bin/phpunit on line 38

There were lots of talk on Google about people who suffered the same problem. It took me a while to work out what was going on

It turns out that somewhere along the way the dependancies of PHPUnit have changed and I needed to update the PEAR packages (including the root PEAR installer) and add a couple new ones too.

This should get you back on track if you are having the same problems.

sudo -s
pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear channel-discover components.ez.no
pear upgrade-all
pear install --alldeps phpunit/PHPUnit

Posted

in

by

Comments

Leave a Reply