Skip to content

Commit

Permalink
Travis: require PHPUnit 9.3 for PHP 8
Browse files Browse the repository at this point in the history
PHPUnit 9.3 is not yet released (expected end of August), but is slated to add official PHP 8 support to PHPUnit.

As some tests are failing due to the new reserved keyword `match` being used in PHPUnit, I'm (temporarily) upping the PHPUnit requirement for PHP 8 explicitly to PHPUnit 9.3 (dev).

Once PHPUnit 9.3 has been released, this condition can be removed in favour of changing the requirements in the `composer.json` file.

Note: for now the `--ignore-platform-reqs` is still needed as the underlying dependencies may still not have tagged a version which officially supports PHP 8 and this would cause a requirement conflict.

Ref: sebastianbergmann/phpunit#4373
  • Loading branch information
jrfnl committed Jul 21, 2020
1 parent 8a62a0e commit bb0a449
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ install:
# The Composer PHPCS plugin takes care of setting the installed_paths for PHPCS.
- |
if [[ $TRAVIS_PHP_VERSION == "nightly" ]]; then
# Temporary fix - PHPUnit 9.3 is supposed to officially support PHP 8.
composer require --no-update phpunit/phpunit:"^9.3"
# PHPUnit 9.x does not (yet) allow for installation on PHP 8, so ignore platform
# requirements to get PHPUnit 9.x to install on nightly.
composer install --prefer-dist --no-suggest --ignore-platform-reqs
Expand Down

0 comments on commit bb0a449

Please sign in to comment.