language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - nightly

env:
  matrix:
    - DEPENDENCIES="high" DRIVER="xdebug"
    - DEPENDENCIES="low"  DRIVER="xdebug"
    - DEPENDENCIES="high" DRIVER="phpdbg"
    - DEPENDENCIES="low"  DRIVER="phpdbg"

sudo: false

before_install:
  - composer self-update
  - composer clear-cache

install:
  - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable; fi
  - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable --prefer-lowest; fi

script:

  - if [[ "$DRIVER" = 'phpdbg' ]]; then phpdbg -qrr vendor/bin/phpunit; fi
  - if [[ "$DRIVER" = 'xdebug' ]]; then vendor/bin/phpunit; fi

notifications:
  email: false

