How to upgrade phpunit to the new version?

Current, I installed phpunit. I am using OS win 10. I think I installed the new version from https://phpunit.de/ (current version 5.6, beta 5.7). But when checking the version with the command line, this is version 3.7. My version of PHP Unit

I read these posts: How do I update phpunit? . But I do not understand. Help me!!!: (

+4
source share
4 answers

Just download the latest version and replace the old one. It is provided from the phpunit homepage.

$ wget https://phar.phpunit.de/phpunit.phar

$ chmod +x phpunit.phar

$ sudo mv phpunit.phar /usr/local/bin/phpunit

You are in the latest version. To check the version you can use

$ phpunit --check-version
+6
source

PHPUnit PHP Archive (PHAR), :

phpunit --self-update

, :

openssl PHAR.

.

+4

It looks like you have installed PHPUnit 3.7 worldwide and on your PATH. Either replace your global phpunitwith a loaded PHAR, or explicitly execute the latter.

+3
source

There are two different things: update and update. If you type

Phpunit

he will show you all the available commands. If at the end you see what it shows

--self-update       Update PHPUnit to the latest version within the same
                    release series.

--self-upgrade      Upgrade PHPUnit to the latest version.

Try what you need.

+1
source

Source: https://habr.com/ru/post/1661261/


All Articles