language: php

branches:
  # Only test the master branch and SemVer tags.
  only:
    - master
    - /^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/

matrix:
  include:
    - php: 7.2
      env: 'SCENARIO=symfony4 DEPENDENCIES=highest'
    - php: 7.1
      env: 'SCENARIO=symfony4'
    - php: 7.0
      env: 'DEPENDENCIES=highest'
    - php: 7.0
    - php: 5.6
      env: 'SCENARIO=phpunit4'
    - php: 5.5
      env: 'SCENARIO=phpunit4'
    - php: 5.4
      env: 'SCENARIO=symfony2 DEPENDENCIES=lowest'

sudo: false

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

install:
  - '.scenarios.lock/install "${SCENARIO}" "${DEPENDENCIES}"'

script:
  - composer test

after_success:
  - 'travis_retry php vendor/bin/php-coveralls -v'
