Skip to content

Commit 8dd0ae5

Browse files
committed
Fix Infection job in travis under php7.3
Manually installs the latest copy of phpunit 8.x for php 7.3 because while phpunit9 is compatible with php7.3, infection is not able to read the new xml config schema that phpunit uses as of v9.
1 parent a0501aa commit 8dd0ae5

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ matrix:
77
env: PHPUNIT_LEGACY="true"
88
- php: 7.3
99
dist: bionic
10+
env: PHPUNIT_LEGACY="true"
1011
- php: 7.4
1112
dist: bionic
1213
- php: nightly
@@ -23,6 +24,18 @@ cache:
2324
install:
2425
- travis_retry composer install $COMPOSER_OPTS
2526

27+
# Where PHPUnit v8 is used, we need to replace the config.
28+
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]
29+
&& [ ${TRAVIS_PHP_VERSION:2:1} -lt 4 ]; then
30+
mv -v tests/phpunit.legacy.xml tests/phpunit.xml
31+
; fi
32+
33+
# PHPUnit 9 supports 7.3, but Infection PHP 18 can't read
34+
# its config so instead we downgrade to PHPUnit 8.5 here.
35+
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then
36+
travis_retry composer require -W phpunit/phpunit:^8.5
37+
; fi
38+
2639
script:
2740
- vendor/bin/grumphp run
2841

0 commit comments

Comments
 (0)