language: php

matrix:
    include:
        - php: hhvm-3.24
          dist: trusty
        - php: 5.4
          dist: trusty
          env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
        - php: 5.4
          dist: trusty
        - php: 5.5.9
          dist: trusty
          env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
    fast_finish: true

before_install:
    - if [[ "$TRAVIS_PHP_VERSION" != "hhvm-3.24" ]]; then echo "xdebug.overload_var_dump = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
    - if [[ "$TRAVIS_PHP_VERSION" == "hhvm-3.24" ]]; then travis_retry composer require "phpunit/phpunit:^5.7.27" --dev --no-update -n; fi

install:
    - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]]; then travis_retry composer update; fi
    - if [[ "$TRAVIS_PHP_VERSION" == "nightly" ]]; then travis_retry composer update --ignore-platform-reqs; fi

script:
    - make test
