language: php
dist: trusty

php:
    - 5.4
    - 5.5
    - 5.6
    - 7.0
    - 7.1
    - 7.2
    - 7.3
    - 7.4
    - 8.0
    - nightly
matrix:
    allow_failures:
        - php: nightly

install:
    - if [[ $TRAVIS_PHP_VERSION == '8.*' ]]; then composer config platform.php 7.4.99; fi
    - composer update

script: ./vendor/bin/phpunit -c tests/phpunit.xml

language: php
dist: xenial

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3
  - 7.4
  - 8.0
  - nightly
matrix:
  include:
    - php: 5.4
      dist: trusty
    - php: 5.5
      dist: trusty
  allow_failures:
    - php: nightly

install:
  - if [[ $TRAVIS_PHP_VERSION == '8.*' ]]; then composer config platform.php 7.4.99; fi
  - composer update

script: ./vendor/bin/phpunit -c tests/phpunit.xml

Use xenial except for php5.4,5.5
Use xenial except for php5.4,5.5
