language: php

php:
    - 5.6
    - 7.1
    - 7.2

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

matrix:
    include:
        - php: 5.6
          env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
        - php: 5.6
          env: DEPENDENCIES="symfony/lts:^2"
        - php: 7.1
          env: DEPENDENCIES="symfony/lts:^3"
    fast_finish: true

install:
    - if [ "$DEPENDENCIES" != "" ]; then composer require --no-update $DEPENDENCIES; fi;
    - composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script:
    - composer validate --no-check-lock --strict
    - ./vendor/bin/phpunit --coverage-text --colors
