1
- sudo : false
2
1
os :
3
2
- linux
4
3
language : php
5
4
php :
6
5
- 7.2
7
6
- 7.3
8
7
- 7.4
8
+ - 8.0
9
9
env :
10
10
- DEPENDENCIES=lowest
11
11
- DEPENDENCIES=highest
@@ -20,8 +20,16 @@ cache:
20
20
- $HOME/.composer/cache
21
21
22
22
before_script :
23
- - if [ "${DEPENDENCIES}" = "lowest" ]; then composer update --prefer-lowest --prefer-dist --no-interaction --no-progress; fi;
24
- - if [ "${DEPENDENCIES}" = "highest" ]; then composer update --prefer-dist --no-interaction --no-progress; fi;
23
+ # PHPUnit 8.x is not (yet) supported, so prevent issues with Travis images using it.
24
+ - |
25
+ if [ "${TRAVIS_PHP_VERSION}" != "8.0" ]; then
26
+ export PHPUNIT_WORKAROUND=""
27
+ elif [ "${TRAVIS_PHP_VERSION}" = "8.0" ]; then
28
+ # Allow installing "incompatible" PHPUnit version on PHP 8.
29
+ export PHPUNIT_WORKAROUND="--ignore-platform-reqs"
30
+ fi
31
+ - if [ "${DEPENDENCIES}" = "lowest" ]; then composer update ${PHPUNIT_WORKAROUND} --prefer-lowest --prefer-dist --no-interaction --no-progress; fi;
32
+ - if [ "${DEPENDENCIES}" = "highest" ]; then composer update ${PHPUNIT_WORKAROUND} --prefer-dist --no-interaction --no-progress; fi;
25
33
- if [ "${DEPENDENCIES}" = "highest" ]; then pecl install -f ast-1.0.10; fi; # Install AST extension, as phan uses it
26
34
- export XMLLINT_INDENT=" "
27
35
@@ -48,17 +56,18 @@ script:
48
56
jobs :
49
57
include :
50
58
- stage : Test
51
- name : PHP:7.3 Windows
59
+ name : PHP:8.0 Windows
52
60
os : windows
53
61
cache :
54
62
directories :
55
63
- C:/Users/travis/AppData/Local/Composer
56
- language : sh # No PHP currently
64
+ language : shell # No PHP currently
57
65
env :
58
- - PHP_VERSION=7.3
66
+ - TRAVIS_PHP_VERSION=8.0
59
67
- DEPENDENCIES=lowest
60
68
install :
61
- - export EXACT_PHP_VERSION=$(choco search php --exact --all-versions --limit-output | grep $PHP_VERSION | cut -d \| -f 2)
69
+ # this doesn't work since choco 0.10.14 and currently there's no workaround, so the highest available version is used always
70
+ - export EXACT_PHP_VERSION=$(choco search php --exact --all-versions --limit-output | grep $TRAVIS_PHP_VERSION | cut -d \| -f 2)
62
71
- choco install php --version=${EXACT_PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php"
63
72
- choco install composer --ia "/DEV=C:\tools\php"
64
73
- export PATH=/c/tools/php:$PATH
0 commit comments