language: php

env:
  global:
    - COMPOSER_STABILITY=stable
    - COLLECT_COVERAGE=false

matrix:
  fast_finish: true
  include:
    - php: 5.6
    - php: 5.6
      env: COMPOSER_STABILITY=lowest
    - php: 7.0
    - php: 7.0
      env: COMPOSER_STABILITY=lowest
    - php: 7.1
      env: COLLECT_COVERAGE=true
    - php: 7.1
      env: COMPOSER_STABILITY=lowest

sudo: false

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

before_script:
  - travis_retry composer self-update

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

script:
  - if [[ "$COLLECT_COVERAGE" = "true" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover coverage.xml; else vendor/bin/phpunit --no-coverage; fi

after_script:
  - if [[ "$COLLECT_COVERAGE" = "true" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi

language: php

env:
  global:
    - COMPOSER_STABILITY=stable
    - COLLECT_COVERAGE=false

matrix:
  fast_finish: true
  include:
    - php: 5.6
    - php: 5.6
      env: COMPOSER_STABILITY=lowest
    - php: 7.0
    - php: 7.0
      env: COMPOSER_STABILITY=lowest
    - php: 7.1
    - php: 7.1
      env: COMPOSER_STABILITY=lowest
    - php: 7.2
      env: COLLECT_COVERAGE=true
    - php: 7.2
      env: COMPOSER_STABILITY=lowest

sudo: false

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

before_script:
  - travis_retry composer self-update

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

script:
  - if [[ "$COLLECT_COVERAGE" = "true" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover coverage.xml; else vendor/bin/phpunit --no-coverage; fi

after_script:
  - if [[ "$COLLECT_COVERAGE" = "true" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi

Add php 7.2 to build environment.
:construction_worker: Add php 7.2 to build environment.
