5

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).

Community
  • 1
  • 1
zerkms
  • 249,484
  • 69
  • 436
  • 539
  • How about using Composer for installing/updating PHPUnit? – Igor Timoshenko Dec 30 '12 at 21:28
  • @Igor Timoshenko: yep, it's an alternative. But as I answered - as soon as phpunit depends on newer php version (and I'm sure there is a reason for that) - there is a chance phpunit won't work well on it – zerkms Dec 30 '12 at 21:29

2 Answers2

3

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)

zerkms
  • 249,484
  • 69
  • 436
  • 539
1

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.

Steven Scott
  • 10,234
  • 9
  • 69
  • 117
  • i was having the same problem and after reading your comment just went to my bosses office, kicked his door and said "hey dude, you are going to update all clusters to Ubuntu 12.10, renew our contracts with support and hire people to refactor/rebuild/retest the entire infrastructure so we can get an upgraded version of phpunit". he loved the idea. thanks! – eyurdakul Jan 18 '17 at 13:00
  • ;-) I agree the update is not always possible. It did some the one problem. Also note that the PHPUnit source is also moving forward and requiring newer PHP base versions all the time. Different functionality is available in the different versions so your tests might not be able to handle everything. Also, the Ubuntu 10.04 is past end of life (May 9, 2013 (Desktop) April 30, 2015 (Server)) so should be considered for an update at some point. – Steven Scott Jan 18 '17 at 18:36