language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - nightly

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

## Cache composer
cache:
  directories:
    - $HOME/.composer/cache

matrix:
  fast_finish: true
  include:
    - php: 5.6
      env: 'COMPOSER_FLAGS="--prefer-stable --prefer-dist --optimize-autoloader"'
  allow_failures:
    - php: 7.2
    - php: nightly

before_script:
  - travis_retry composer self-update
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
  - composer config --list --global

script:
  - vendor/bin/phpunit

language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - nightly

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

## Cache composer
cache:
  directories:
    - $HOME/.composer/cache

matrix:
  fast_finish: true
  include:
    - php: 5.6
      env: 'COMPOSER_FLAGS="--prefer-stable --prefer-dist --optimize-autoloader"'
  allow_failures:
    - php: nightly

before_script:
  - travis_retry composer self-update
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
  - composer config --list --global

script:
  - vendor/bin/phpunit

Allow failures only for nightly php builds.
Allow failures only for nightly php builds.