How to install PHPUnit 3.5 instead of 3.6?

The current version of PHPUnit is 3.6, but until I update my code, I need to use 3.5.15 instead. I have many problems trying to install 3.5.15.

I start with a clean installation of Zend Server, on which several basic PEAR packages are installed. I open pear.phpunit.de and pear.symfony-project.com. Then I try to install 3.5.15 from the url, but it fails:

# pear install http://pear.phpunit.de/get/PHPUnit-3.5.15.tgz downloading PHPUnit-3.5.15.tgz ... Duplicate package channel://pear.phpunit.de/PHPUnit-3.5.15 found Duplicate package channel://pear.phpunit.de/PHPUnit-3.6.0 found install failed 

Next, I try to install from the downloaded file, but this also fails:

 # pear install ~/Desktop/PHPUnit-3.5.15.tgz Duplicate package channel://pear.phpunit.de/PHPUnit-3.5.15 found Duplicate package channel://pear.phpunit.de/PHPUnit-3.6.0 found install failed 

And then from PEAR directly ... which installs 3.6 instead of what I requested!

 # pear install phpunit/PHPUnit-3.5.15 phpunit/PHPUnit can optionally use package "pear/XML_RPC2" phpunit/PHPUnit can optionally use PHP extension "dbus" phpunit/DbUnit requires package "phpunit/PHPUnit" (version >= 3.6.0), downloaded version is 3.5.15 phpunit/PHPUnit requires package "phpunit/DbUnit" (version >= 1.0.0) phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.0.0) downloading File_Iterator-1.3.0.tgz ... downloading Text_Template-1.1.1.tgz ... downloading PHP_CodeCoverage-1.1.0.tgz ... downloading PHP_Timer-1.0.2.tgz ... downloading PHPUnit_MockObject-1.1.0.tgz ... downloading PHPUnit_Selenium-1.1.0.tgz ... downloading YAML-1.0.6.tgz ... downloading PHPUnit-3.6.0.tgz ... downloading PHP_TokenStream-1.1.0.tgz ... install ok: channel://pear.phpunit.de/File_Iterator-1.3.0 install ok: channel://pear.phpunit.de/Text_Template-1.1.1 install ok: channel://pear.phpunit.de/PHP_Timer-1.0.2 install ok: channel://pear.symfony-project.com/YAML-1.0.6 install ok: channel://pear.phpunit.de/PHP_TokenStream-1.1.0 install ok: channel://pear.phpunit.de/PHP_CodeCoverage-1.1.0 install ok: channel://pear.phpunit.de/PHPUnit_MockObject-1.1.0 install ok: channel://pear.phpunit.de/PHPUnit-3.6.0 install ok: channel://pear.phpunit.de/PHPUnit_Selenium-1.1.0 

Even using the -f option to try to force the version I requested to install does not change anything.

How do I install 3.5.15?

+4
source share
6 answers

PHPUnit-3.5.15 requires DbUnit, but the latest version of DbUnit (1.1.0) requires PHPUnit-3.6. Therefore, when I installed PHPUnit 3.5.15, 3.6 will be installed instead. I worked on the problem by specifically installing DbUnit-1.0.3.

I will accept my answer, but this is not a complete answer - an attempt to install PHPUnit 3.5 leads to the installation of a module, which then forcibly installs PHPUnit 3.6, and this seems incorrect. This seems like a packaging problem, but I couldn't figure out where to report it.

+3
source

There are many dependencies you have to deal with in order for Pear NOT to force the installation of PHPUnit 3.6. Here is what I did to install PHPUnit 3.5.15: http://dustyreagan.com/downgrade-phpunit-3-6-to-3-5-15/

+6
source

I was unable to correctly install PHPUnit on Ubuntu

Install on widnows 7 now the next tip from here http://dustyreagan.com/downgrade-phpunit-3-6-to-3-5-15/

and abstracting it :) now I hope that I can install ubuntu too

-

Now he had the correct version of phpunit installed.

+3
source

To get a question from an unanswered list:


PHPUnit-3.5.15 requires DbUnit, but the latest version of DbUnit (1.1.0) requires PHPUnit-3.6.

So why, when I installed PHPUnit 3.5.15, 3.6 will be installed instead. I worked on the problem by specifically installing DbUnit-1.0.3

+1
source

install it through the composer:

 { ... "repositories": [ { "type": "pear", "url": "pear.symfony-project.com" }, { "type": "pear", "url": "pear.phpunit.de" } ], "require-dev": { "pear-pear.phpunit.de/phpunit": "3.5.15", "pear-pear.phpunit.de/PHP_CodeCoverage": "1.0.*", "pear-pear.phpunit.de/File_Iterator": "1.2.3" } } 
0
source

All Articles