PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 30, 2022

[FIXED] How do I install PHPUnit 3.5, instead of 3.6?

 August 30, 2022     pear, phpunit     No comments   

Issue

The current version of PHPUnit is 3.6, but until I update my code I need to use 3.5.15 instead. I'm having a lot of trouble trying to get 3.5.15 installed.

I start with a clean install of Zend Server, which only has a few basic PEAR packages installed. I channel-discover pear.phpunit.de and pear.symfony-project.com. Then I try installing 3.5.15 from a 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 installing from a downloaded file, but that 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 asked for!

# 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 an installation of the version I asked for, doesn't change anything.

How do I get 3.5.15 installed?


Solution

PHPUnit-3.5.15 requires DbUnit, but the latest version of DbUnit (1.1.0) requires PHPUnit-3.6. So that's why, when I installed PHPUnit 3.5.15, 3.6 would be installed instead. I worked around the problem by specifically installing DbUnit-1.0.3.

I'll accept my own answer, but it's not a complete answer - an attempt to install PHPUnit 3.5 results in the installation of a module which then forces the install of PHPUnit 3.6, and that doesn't seem right. This looks like a packaging problem, but I couldn't figure out where to report it.



Answered By - Brian Kendig
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing