language: php

sudo: false

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

php:
    - 7.0
    - 7.1
    - 7.2
    - hhvm

env:
    global:
        - TEST_COMMAND="composer test"

branches:
    except:
        - /^analysis-.*$/

matrix:
    allow_failures:
        - php: hhvm
    fast_finish: true

before_install:
    - if [[ $COVERAGE != true && $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi

install:
    - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction

before_script:
    - vendor/bin/http_test_server > /dev/null 2>&1 &

script:
    - $TEST_COMMAND

after_success:
    - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
    - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

language: php

sudo: false

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

php:
    - 7.0
    - 7.1
    - 7.2
    - 7.3
    - hhvm

env:
    global:
        - TEST_COMMAND="composer test"

branches:
    except:
        - /^analysis-.*$/

matrix:
    allow_failures:
        - php: hhvm
    fast_finish: true
    include:
        - php: 7.0
          env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"

before_install:
    - if [[ $COVERAGE != true && $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi

install:
    - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction

before_script:
    - vendor/bin/http_test_server > /dev/null 2>&1 &

script:
    - $TEST_COMMAND

after_success:
    - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
    - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

Apply requested changes to Travis configuration
Apply requested changes to Travis configuration
