branches:
    only:
        - master

dist: xenial
language: php

php:
    - 7.1
    - 7.2
    - 7.3
    - 7.4
    - 8.0

env:
   - SYMFONY_VERSION=~4.0
   - SYMFONY_VERSION=~5.0

matrix:
  allow_failures:
    - php: 7.1
      env: 'SYMFONY_VERSION=~5.0'

before_install:
    - phpenv config-rm xdebug.ini || true
    - echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

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
