How do I update phpunit?

为君一笑 提交于 2020-02-02 03:14:07

问题


I have already tried everything, including https://stackoverflow.com/a/8740349/251311 and all possible channel upgrade and clear cache commands. But still:

$ sudo pear install -a -f phpunit/PHPUnit
downloading PHPUnit-3.6.12.tgz ...
Starting to download PHPUnit-3.6.12.tgz (120,240 bytes)
..........................done: 120,240 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.6.12

while:

$ pear list-upgrades
Channel pear.php.net: No upgrades available
pear.phpunit.de Available Upgrades (stable):
============================================
Channel         Package            Local           Remote          Size
pear.phpunit.de PHPUnit            3.6.12 (stable) 3.7.10 (stable) 115kB
pear.phpunit.de PHPUnit_MockObject 1.1.1 (stable)  1.2.2 (stable)  19.9kB
pear.phpunit.de PHPUnit_Selenium   1.2.8 (stable)  1.2.11 (stable) 38kB
pear.phpunit.de PHP_CodeCoverage   1.1.4 (stable)  1.2.7 (stable)  155kB
pear.phpunit.de PHP_TokenStream    1.1.4 (stable)  1.1.5 (stable)  9.7kB
pear.phpunit.de Text_Template      1.1.3 (stable)  1.1.4 (stable)  3.6kB

Award

There will be 100 points bounty for a person who will hint what can cause PEAR not be able to upgrade phpunit to the latest possible (using PEAR).


回答1:


Well, I use ubuntu lts 10.04, and it has php 5.3.2 version.

While phpunit 3.7 depends on php >= 5.3.3 (though it's not shown explicitly anywhere)




回答2:


I updated my Ubuntu to 12.10, which gives me PHP 5.4.x, and then the newer version of PHPUnit as well. I believe you need the 5.4.x of PHP to use the latest PHPUnit. Try updating PHP to be 5.4.x and then try the PHPUnit update again.



来源:https://stackoverflow.com/questions/14094452/how-do-i-update-phpunit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!