language: php

sudo: false

php:
  - 7.1
  - 7.2
  - 7.3
  - 7.4

env:
  matrix:
    - SYMFONY_VERSION="3.4.*"
    - SYMFONY_VERSION="4.4.*"
    - SYMFONY_VERSION="5.0.*"

matrix:
  fast_finish: true
  exclude:
    - php: 7.1
      env: SYMFONY_VERSION="5.0.*"

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

before_install:
  - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
  - composer selfupdate
  - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/skeleton:${SYMFONY_VERSION}" --no-update; fi;

install:
  - composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script:
  - vendor/bin/phpunit
