Skip to content

Commit

Permalink
Travis: force use of PHPUnit 5.7 with PHP >= 5.6
Browse files Browse the repository at this point in the history
On 2017-03-09, Travis deployed the latest version of PHPUnit (6.0.8) on
their workers. Since that day, our builds on PHP >= 5.6 are failing,
because 6.0.8 only supports PHP 7.0 and 7.1 (<= 5.5 are OK, because they
are running an older PHPUnit version).

PHP 7.x builds are failing as well, because PHPUnit 6.x introduced
changes that are breaking the MantisBT tests.

As a workaround, we download and install PHPUnit 5.7 if the Travis PHP
version is 5.6 or later.

Fixes #22503
  • Loading branch information
dregad committed Mar 20, 2017
1 parent f2f8561 commit 5efd115
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -8,6 +8,10 @@ language: php
# Environment setup and test scripts execution
#

before_install:
# If PHP >= 5.6, download & install PHPunit 5.7 to avoid builds failures
- if php -r "exit( (int)! version_compare( '$TRAVIS_PHP_VERSION', '5.6', '>=' ) );"; then wget -O phpunit https://phar.phpunit.de/phpunit-5.7.phar && chmod +x phpunit && mkdir ~/bin && mv -v phpunit ~/bin; fi

before_script:
- ./scripts/travis_before_script.sh

Expand Down

0 comments on commit 5efd115

Please sign in to comment.