How do I install PHPUnit 3.5, instead of 3.6? - phpunit

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?

There are a lot of dependencies you have to deal with to have Pear NOT forcibly install PHPUnit 3.6. Here's what I did to get PHPUnit 3.5.15 installed: http://dustyreagan.com/downgrade-phpunit-3-6-to-3-5-15/

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.

I have not been able to install PHPUnit correctly on Ubuntu
Am installing on widnows 7 now
following advice from here
http://dustyreagan.com/downgrade-phpunit-3-6-to-3-5-15/
and abstracting it :) now hopeful that I will be able to install upon
ubuntu too
--
It worked now have phpunit correct version installed.

To get the question from the unanswered list:
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

This worked fine for me
http://dustyreagan.com/downgrade-phpunit-3-6-to-3-5-15/

install it via 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"
}
}

Related

chocolatey: meteor v0.0.2 is the latest version available based on your source(s)

I follow the instructions to install meteor 1.6 on Windows(10) as stated on Meteor.com (choco install meteor) and it's installed a meteor v0.0.2 ?
When I try to run any meteor command I get: bash: meteor: command not found
and when I try choco upgrade meteor I get:
$ choco upgrade meteor
Chocolatey v0.10.8
Upgrading the following packages:
meteor
By upgrading you accept licenses for the packages.
meteor v0.0.2 is the latest version available based on your source(s).
Chocolatey upgraded 0/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
I tried choco uninstall meteor and then reinstall choco instlal meteor but same issue. Searching around online a little I found this page:
https://chocolatey.org/packages/meteor
I do have meteor installed and running on version 1.6.0.1 on Window 10's Ubuntu bash which was installed via curl https://install.meteor.com/ | sh
Following on from above post https://stackoverflow.com/a/47967277/642729 by Gary Ewan Park. The below comment on https://chocolatey.org/packages/meteor clarifies the Chocolately/Meteor versioning
The current version of Meteor is 1.6;
is this the version in the 0.0.2 Chocolatey package?
[Garrie Powers • 2 months ago]
The version number of the Chocolatey package is the version of the installer.
Meteor is unique in the way it works in that all versions
are capable of springboarding to other versions.
Therefore, in the same way as the Unix installer installs the latest version,
the Chocolatey installer will always install the latest version.
So at this exact moment, the answer to your question is "yes"!
[Jesse Rosenberger Garrie Powers • 2 months ago]
The best advice would be to reach out to the maintainers of that package of chocolatey.org. This can be done by clicking on the "Contact Maintainers" link of this page:
https://chocolatey.org/packages/meteor
It would seem that the creators of the application, also own the Chocolatey package, so hopefully they will get back to you.
From the official installer github:
The version of this Meteor installer is not to be confused with Meteor itself. Meteor, once installed, will always "springboard" to (download, install and run) the correct version of Meteor necessary for the application being executed.
...
When necessary, specific versions of Meteor can be installed using
Chocoloatey's --params argument which will download that specific
version from Meteor's installation server. For example, to install
Meteor 1.5.4.4:
C:> choco install meteor --params="'/RELEASE:1.6.0.1'"
Note: Prior to
Meteor 1.6, 64-bit versions were not available. Therefore, in order to
install versions prior to Meteor 1.6, you'll also need to pass
Chocolatey's --x86 option when running choco install on 64-bit Windows
platforms. For example:
C:> choco install meteor --x86 --params="'/RELEASE:1.5.4.4'"

Attempting to run R with Atlas/OpenBLAS on redhat

For two days I've been trying to install Openblas/atlas with Lapack and use it in R. it's driving me crazy. I'm at a point where I can't even think anymore.
My server uses:
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Here is what I've installed so far:
[root#tpdb05 atlas]# yum install atlas.x86_64 blas.x86_64 lapack.x86_64 Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Setting up Install Process
Package atlas-3.8.4-2.el6.x86_64 already installed and latest version
Package blas-3.2.1-4.el6.x86_64 already installed and latest version
Package lapack-3.2.1-4.el6.x86_64 already installed and latest version
[root#tpdb05 ruser]#
yum install lapack.i686
Installed:
lapack.i686 0:3.2.1-4.el6
Dependency Installed:
blas.i686 0:3.2.1-4.el6 glibc.i686 0:2.12-1.166.el6_7.3 libgfortran.i686 0:4.4.7-16.el6
nss-softokn-freebl.i686 0:3.14.3-23.el6_7
Dependency Updated:
glibc.x86_64 0:2.12-1.166.el6_7.3 glibc-common.x86_64 0:2.12-1.166.el6_7.3 glibc-devel.x86_64 0:2.12-1.166.el6_7.3
glibc-headers.x86_64 0:2.12-1.166.el6_7.3 nss-softokn-freebl.x86_64 0:3.14.3-23.el6_7
yum install atlas.i686
Installed:
atlas.i686 0:3.8.4-2.el6
[root#tpdb05 SRPMS]# yum install rpm-build
Installed:
rpm-build.x86_64 0:4.8.0-47.el6
Dependency Installed:
redhat-rpm-config.noarch 0:9.0.3-44.el6
Dependency Updated:
rpm.x86_64 0:4.8.0-47.el6 rpm-libs.x86_64 0:4.8.0-47.el6 rpm-python.x86_64 0:4.8.0-47.el6
[root#tpdb05 SRPMS]# yum install atlas-c++-devel.x86_64
Installed:
atlas-c++-devel.x86_64 0:0.6.1-1.el5.rf
Dependency Installed:
atlas-c++.x86_64 0:0.6.1-1.el5.rf
several sources I've tried without success:
1 2 3
The R manual mentions the following:
The usual way to specify ATLAS will be via
--with-blas="-lf77blas -latlas"
However I have no clue where to use this command. While installing R? I'm pretty sure it should be possible to simply swap between libraries..
How do I get R to use the atlas/openblas/lapack libraries?

Tktable : could not be found in R

I try to use tcltk in R, but the package Tktable could not be found.
> library("tcltk")
Loading Tcl/Tk... OK
> tclRequire("Tktable")
[1] FALSE
Warning :
In tclRequire("Tktable") : the package Tcl 'Tktable' is not found
When I install R (r-base-core) all this linux package are installed too :
tcl install
tcl-dev install
tcl8.5 install
tcl8.5-dev install
tcllib install
tk install
tk-dev install
tk8.5 install
tk8.5-dev install
tklib install
I tried to install manually libtktable2.9, and those packages are automatically installed :
libtktable2.9:i386 install
tk8.4:i386 install
tcl8.4:i386 install
I tried the fonction addTclPath in R (with different path, because I dont really understand where is the tcl location...), but nothing changes.
I saw similar posts on few forums but no answer yet.
Any idea?
http://bioinf.wehi.edu.au/affylmGUI/#testBWTk describes installing Tktable.
To install Tktable download from http://tktable.sourceforge.net. From
this site, select "File Distributions, select the "tktable" link,
select the latest version (currently 2.10), then select the tar.gz
file (currently "Tktable2.10.tar.gz"). Save it to a suitable location,
unzip and untar it (Example command is "tar zxf Tktable2.10.tar.gz").
look in the Tktable directory and read the README.txt file
installation instructions.
To get Tktable to install on debian, I installed this first
sudo apt-get install tcl-dev tk-dev mesa-common-dev libjpeg-dev libtogl-dev
On Ubuntu 18.04, I could just install the package tk-table
sudo apt install tk-table
Just for documentation purposes for other readers:
Windows users should be aware that the Tcl extensions ‘BWidget’ and
‘Tktable’ which are included with the R for Windows installer are
extensions and do need to be declared. ‘Tktable’ does ship as part of
the Tcl/Tk provided on CRAN for Mac OS X, but you will need to tell
your users how to make use of it:
> addTclPath('/usr/local/lib/Tktable2.9')
> tclRequire('Tktable')
<Tcl> 2.9
So there is no need for an extra tcl/tk or tktable installation.
Source: http://www.pqr-project.org/R-exts.html

how to upgrade phpunit`s PHP_CodeCoverage

I have the problem of upgrading my phpunit with pyrus, and it always output something like:
Pyrus\Installer\Exception: Dependency validation failed for some packages to install, installation aborted
Pyrus\Dependency\Exception: pear.phpunit.de/PHPUnit requires package "channel://pear.phpunit.de/PHP_CodeCoverage" (version >= 1.2.1), installed version is 1.2.0
Pyrus\Dependency\Exception: pear.phpunit.de/PHPUnit can optionally use package "channel://pear.phpunit.de/PHP_Invoker" (version >= 1.1.0)
I have use the -f flag to force upgrade my phpunit from 3.7.0 to 3.7.1, but other packages still not upgrade.
I have tried to use the command php pyrus.phar upgrade phpunit/PHP_CodeCoverage to upgrade PHP_CodeCoverage, but I got the something like:
Skipping installed package pear.phpunit.de/PHP_CodeCoverage
How can I upgrade ohter package separatly?
Try --alldeps flag, should help: http://pear.php.net/manual/en/guide.users.commandline.installing.php

Failed to download pear/HTTP_Request2 within preferred state "stable"

When trying to do
pear install phpunit/PHPUnit
I get the following error
Failed to download pear/HTTP_Request2 within preferred state "stable", latest release is version 2.0.0RC1, stability "beta", use "channel://pear.php.net/HTTP_Request2-2.0.0RC1" to install
phpunit/PHPUnit can optionally use PHP extension "curl"
phpunit/PHPUnit can optionally use PHP extension "dbus"
pear/XML_RPC2 requires package "pear/HTTP_Request2" (version >= 0.6.0)
phpunit/PHPUnit requires package "pear/XML_RPC2"
No valid packages found
install failed
It says right there to use another channel, but I can't seem to discover or add that channel! What's the correct command to do this, or what else could I do?
Thank you very much,
MrB
edit:
Got it, wow, 10s after posting.
pear install HTTP_Request2-2.0.0RC1
As mentioned in the online PEAR manual, the PEAR installer by default only installs stable packages. If you wish to install a package that hasn't yet been declared stable, you can do so, without changing the preferred state, by also specifying the version number or its state when attempting to install it. Thus:
$ pear install -f package_name-1.2.3
Or, if a package is in beta you can install it with:
$ pear install -f package_name-beta
Similarly, if the package is in alpha:
$ pear install -f package_name-alpha
There is a 'devel' stability state too, but not that many packages are released in that state.
Sometimes the error message will include a useful hint, as seen in your question above ;)

Resources