language: php

sudo: false

cache:
    directories:
        - vendor
        - $HOME/.composer/cache/files

matrix:
    include:
        - php: 7.0
        - php: 7.1
        - php: 7.2
        - php: nightly
    fast_finish: true

before_install:
    # turn off XDebug
    - phpenv config-rm xdebug.ini || return 0

install:
    - travis_retry composer install

script: |
    if [[ $TRAVIS_PHP_VERSION = 7.* || $TRAVIS_PHP_VERSION = nightly ]]; then
        SYMFONY_PHPUNIT_VERSION=6.1 ./vendor/bin/simple-phpunit
    else
        ./vendor/bin/simple-phpunit
    fi