Skip to content

Commit 751ec21

Browse files
committed
Travis: change from "trusty" to "xenial"
As the "trusty" environment is no longer officially supported by Travis, they decided in their wisdom to silently stop updating the PHP "nightly" image, which makes it next to useless as the last image apparently is from January.... This updates the Travis config to: * Use the `xenial` distro, which at this time is the default. * Sets the distro for low PHP versions explicitly to `trusty`. * Makes the expected OS explicit (linux). * Updates the `matrix` key to `jobs`, which is the canonical for which `matrix` is an alias. * Removed `sudo: false` - this hasn't been supported for over a year now. As the `xenial` images (again) appear to randomly be shipped with incompatible PHPUnit versions, I'm changing the setup to always run `composer install` and use the PHPUnit in the `vendor` directory. This will make the build less prone to error out on incompatible Travis image changes in the future and should hardly make a difference in build time. Note: the build against PHP nightly will now fail as it is run against a much more recent PHP build. This build failure will be fixed once the comment tokenizer change has been pulled & merged. To pull that PR, merging this one is a prerequisite.
1 parent 5b0b6ab commit 751ec21

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

.travis.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
sudo: false
1+
os: linux
2+
dist: xenial
23
language: php
3-
dist: trusty
44

5-
matrix:
5+
jobs:
66
fast_finish: true
77
include:
88
- php: 5.4
9+
dist: trusty
910
- php: 5.5
11+
dist: trusty
1012
- php: 5.5
13+
dist: trusty
1114
env: CUSTOM_INI=1 XMLLINT=1
1215
addons:
1316
apt:
@@ -19,28 +22,24 @@ matrix:
1922
env: CUSTOM_INI=1 PEAR_VALIDATE=1
2023
- php: 7.1
2124
- php: 7.2
22-
env: PHPUNIT_INCOMPAT=1
2325
- php: 7.3
24-
env: PHPUNIT_INCOMPAT=1
2526
- php: 7.4
26-
env: PHPUNIT_INCOMPAT=1
2727
- php: 7.4
28-
env: PHPSTAN=1 PHPUNIT_INCOMPAT=1
28+
env: PHPSTAN=1
2929
addons:
3030
apt:
3131
packages:
3232
- libonig-dev
3333
# Nightly is PHP 8.0 since Feb 2019.
3434
- php: nightly
35-
env: PHPUNIT_INCOMPAT=1
3635
addons:
3736
apt:
3837
packages:
3938
- libonig-dev
4039

4140
allow_failures:
4241
- php: 7.4
43-
env: PHPSTAN=1 PHPUNIT_INCOMPAT=1
42+
env: PHPSTAN=1
4443
- php: nightly
4544

4645
before_install:
@@ -49,9 +48,9 @@ before_install:
4948
- phpenv config-rm xdebug.ini || echo 'No xdebug config.'
5049
# PHPUnit 8.x is not (yet) supported, so prevent issues with Travis images using it.
5150
- |
52-
if [[ $PHPUNIT_INCOMPAT == "1" && $TRAVIS_PHP_VERSION != "nightly" ]]; then
51+
if [[ $TRAVIS_PHP_VERSION != "nightly" ]]; then
5352
composer install
54-
elif [[ $PHPUNIT_INCOMPAT == "1" && $TRAVIS_PHP_VERSION == "nightly" ]]; then
53+
elif [[ $TRAVIS_PHP_VERSION == "nightly" ]]; then
5554
// Allow installing "incompatible" PHPUnit version on PHP 8/nightly.
5655
composer install --ignore-platform-reqs
5756
fi
@@ -62,12 +61,7 @@ before_script:
6261

6362
script:
6463
- php bin/phpcs --config-set php_path php
65-
- |
66-
if [[ $PHPUNIT_INCOMPAT != "1" ]]; then
67-
phpunit tests/AllTests.php
68-
else
69-
vendor/bin/phpunit tests/AllTests.php
70-
fi
64+
- vendor/bin/phpunit tests/AllTests.php
7165
- if [[ $CUSTOM_INI != "1" ]]; then php bin/phpcs --no-cache --parallel=1; fi
7266
- if [[ $CUSTOM_INI != "1" && $TRAVIS_PHP_VERSION != "nightly" ]]; then pear package-validate package.xml; fi
7367
- if [[ $PEAR_VALIDATE == "1" ]]; then php scripts/validate-pear-package.php; fi

0 commit comments

Comments
 (0)