Failed to download phpunit/phpdcd within preferred state "stable"

Post by on March 25, 2013

If you get the following error when trying to install PHP Dead Code Detector (phpdcd):

$ pear install --alldeps pear.phpunit.de/phpdcd
Failed to download phpunit/phpdcd within preferred state "stable", latest release is version 0.9.3, stability "beta", use "channel://pear.phpunit.de/phpdcd-0.9.3" to install
install failed

You have to force install it:

$ pear install -f pear.phpunit.de/phpdcd

According to Mr. Bergmann in a GitHub issue comment “There is no stable release of PHPDCD." So, force installing is required.

Older Posts »