language: php

php:
    - '5.4'
    - '5.5'
    - '5.6'
    - '7.0'
    - '7.1'
    - '7.2'
    - '7.3'

before_script:
    - if [[ $TRAVIS_PHP_VERSION = '5.4' ]]; then PHPUNIT_FLAGS="--coverage-clover ./clover.xml"; else PHPUNIT_FLAGS=""; fi
    - composer self-update
    - composer install --prefer-source

script:
    - ./vendor/bin/phpunit -v $PHPUNIT_FLAGS

after_script:
    - php vendor/bin/coveralls -v
