We have a Centos 6.3 machine running PHP 5.3.3. I accidentally uninstalled PHPUNIT. I am not able to reinstall it again. The newer versions do not work with PHP 5.3.3. Unfortunately, I cannot update my PHP version (company is stuck). How do I fix it?
I tried:
$ wget https://phar.phpunit.de/phpunit.phar
$ chmod +x phpunit.phar
$ sudo mv phpunit.phar /usr/local/bin/phpunit
$ phpunit --version
as suggested and it is not working.
So I simply took a look at https://phar.phpunit.de and as you can see there, you can specify the version number you want to install, eg.
$ wget https://phar.phpunit.de/phpunit-4.8.9.phar
However, I'd recommend using Composer where you can specify version numbers as well (described in the doc)
{
"require-dev": {
"phpunit/phpunit": "4.8.*"
}
}
Using Composer brings many advantages. One of them is that you can make sure that the same version of a library is used by everyone working on the project (without having to share all the vendor files!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With