0
votes

I use macOs Mojave, MAMP (php 7.1.2) and lately I tried phpUnit, currently running v6.1.1.

I think I need to update phpUnit to v7, since I'm using php7.1.2.

I installed phpUnit via composer. Here some details about the current installation:

phpunit --version PHPUnit 6.1.1 by Sebastian Bergmann and contributors.

which phpunit /usr/local/bin/phpunit

When I try to update, nothing happens:

composer require --dev phpunit/phpunit ^7

./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files

--version PHPUnit 6.1.1 by Sebastian Bergmann and contributors.

Still Version 6.1.1

What am I doing wrong?

Best regards Beat

1

1 Answers

0
votes

When you are running which phpunit /usr/local/bin/phpunit is seems you have PHPUnit installed globally at /usr/local/bin/phpunit.

Do you have version 7 when running vendor/bin/phpunit --version?

To use the local version you would need to run vendor/bin/phpunit instead of just phpunit.

To update PHPUnit globally, see the instructions here: https://phpunit.de/manual/6.5/en/installation.html