language: php

sudo: false

dist: trusty

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

matrix:
  include:
    - php: 5.5
    - php: 5.5
      env: setup=lowest
    - php: 5.6
    - php: 7.0
    - php: 7.0
      env: setup=lowest
    - php: 7.1
    - php: 7.2
    - php: 7.3
    - php: 7.4snapshot

env:
  global:
    - setup=basic

install:
  - if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
  - if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi

script:
  - vendor/bin/phpunit --verbose --coverage-clover=coverage.clover

after_success:
  - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

language: php

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

env:
  global:
    - setup=basic

matrix:
  include:
    - php: 5.5.9
      dist: trusty
      env: setup=lowest
    - php: 5.5
      dist: trusty
    - php: 5.6
      dist: xenial
    - php: 7.0
      dist: xenial
      env: setup=lowest
    - php: 7.0
      dist: xenial
    - php: 7.1
      dist: bionic
    - php: 7.2
      dist: bionic
    - php: 7.3
      dist: bionic
    - php: 7.4
      dist: bionic

install:
  - if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
  - if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi

script:
  - vendor/bin/phpunit --verbose --coverage-clover=coverage.clover

after_success:
  - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

Test on PHP 5.5.9 and 7.4
Test on PHP 5.5.9 and 7.4