Jan 5, 2015

Solved the PHPunit not found problem after updated it by composer

PHPUnit now supports installation via composer:

$sudo composer global require "phpunit/phpunit=4.4.*"
$sudo composer global require "phpunit/phpunit-selenium"
$sudo composer global require "phpunit/dbunit"

But before installation, you would have to uninstall them via phear:

$sudo pear uninstall phpunit/PHPUnit_MockObject  \
 phpunit/PHP_CodeCoverage \
 phpunit/DbUnit \
 phpunit/PHPUnit_Selenium \
 phpunit/PHPUnit \
 phpunit/PHP_Timer \

However, symfony phpunit task lost its link to phpunit after above operations.

sh: 1: phpunit: not found

I had to link phpunit to /usr/local/bin, seems a temporary solution:

sudo ln -fs /home/ACCOUNT/.composer/vendor/bin/phpunit /usr/bin/phpunit

Reference links:
https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method

No comments:

Post a Comment