language: php

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

env:
  global:
    - SYMFONY_PHPUNIT_REMOVE="symfony/yaml"

branches:
    only: [master, stable]

matrix:
  fast_finish: true
  include:
    - php: nightly
      env: DEPS=dev

    - php: 7.1
      env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=23

    - php: 7.2
      env: LTS_VERSION=3 SYMFONY_DEPRECATIONS_HELPER=1
    - php: 7.2
      env: LTS_VERSION=4 SYMFONY_DEPRECATIONS_HELPER=1

  allow_failures:
    - php: nightly

before_install:
  - set -eo pipefail
  - phpenv config-rm xdebug.ini || true
  - if [ -n "$LTS_VERSION" ]; then composer require "symfony/lts:${LTS_VERSION}" --no-update; fi
  - if [ "$DEPS" != "" ]; then perl -pi -e "s/^}\$/,\"minimum-stability\":\"$DEPS\"}/" composer.json; fi

install: composer update --prefer-dist $COMPOSER_FLAGS

script: ./vendor/bin/simple-phpunit

language: php

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

env:
  global:
    - SYMFONY_PHPUNIT_REMOVE="symfony/yaml"

branches:
    only: [master, stable]

matrix:
  fast_finish: true
  include:
    - php: nightly
      env: DEPS=dev

    - php: 7.1
      env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=23

    - php: 7.2
      env: LTS_VERSION=3 SYMFONY_DEPRECATIONS_HELPER=1
    - php: 7.2
      env: LTS_VERSION=4.x-dev SYMFONY_DEPRECATIONS_HELPER=1

  allow_failures:
    - php: nightly

before_install:
  - set -eo pipefail
  - phpenv config-rm xdebug.ini || true
  - if [ -n "$LTS_VERSION" ]; then composer require "symfony/lts:${LTS_VERSION}" --no-update; fi
  - if [ "$DEPS" != "" ]; then perl -pi -e "s/^}\$/,\"minimum-stability\":\"$DEPS\"}/" composer.json; fi

install: composer update --prefer-dist $COMPOSER_FLAGS

script: ./vendor/bin/simple-phpunit

Update LTS 4 version since "4" does not seem to exist yet
Update LTS 4 version since "4" does not seem to exist yet
