branches:
    only:
        - master

dist: xenial
language: php

php:
    - 5.6
    - hhvm
    - 7.0
    - 7.1
    - 7.2

env:
   - SYMFONY_VERSION=~2.1
   - SYMFONY_VERSION=~3.0
   - SYMFONY_VERSION=~4.0

matrix:
  fast_finish: true
  allow_failures:
    - php: 5.6
      env: 'SYMFONY_VERSION=~4.0'
    - php: 7.0
      env: 'SYMFONY_VERSION=~4.0'
    - php: hhvm
      env: 'SYMFONY_VERSION=~4.0'
    - php: hhvm
      dist: xenial

before_script:
    - composer self-update
    - composer require symfony/framework-bundle:${SYMFONY_VERSION} --no-update --dev
    - composer install --no-interaction --prefer-source --no-suggest

script:
    - bin/phpspec run -f dot
