language: php

sudo: false

cache:
    directory:
        - $HOME/.composer/cache/files
        - $HOME/symfony-bridge/.phpunit

env:
    global:
        - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
        - SYMFONY_PHPUNIT_REMOVE="symfony/yaml" # keep Prophecy

php:
    - 5.6
    - 7.0
    - 7.1
    - 7.2
    - nightly

matrix:
    include:
        - php: 5.6
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak
        - php: 7.1
          env: DEPENDENCIES='dev'
        # Test LTS version
        - php: 5.6
          env: SYMFONY_VERSION='^2'
        - php: 7.1
          env: SYMFONY_VERSION='^3' DEPENDENCIES='dev'

before_install:
    - if [ "$DEPENDENCIES" == "dev" ]; then composer config minimum-stability dev; fi;
    - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/lts:${SYMFONY_VERSION} --no-update; fi;

install:
    - composer update $COMPOSER_FLAGS --prefer-dist
    - ./vendor/bin/simple-phpunit install

script:
    - composer validate --strict --no-check-lock
    - ./vendor/bin/simple-phpunit -v

language: php

sudo: false

cache:
    directory:
        - $HOME/.composer/cache/files
        - $HOME/symfony-bridge/.phpunit

env:
    global:
        - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
        - SYMFONY_PHPUNIT_REMOVE="symfony/yaml" # keep Prophecy

php:
    - 5.6
    - 7.0
    - 7.1
    - 7.2
    - nightly

matrix:
    include:
        - php: 5.6
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak
        - php: 7.1
          env: DEPENDENCIES='dev'
        # Test LTS version
        - php: 5.6
          env: SYMFONY_VERSION='^2'
        - php: 7.1
          env: SYMFONY_VERSION='^3'

before_install:
    - if [ "$DEPENDENCIES" == "dev" ]; then composer config minimum-stability dev; fi;
    - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/lts:${SYMFONY_VERSION} --no-update; fi;

install:
    - composer update $COMPOSER_FLAGS --prefer-dist
    - ./vendor/bin/simple-phpunit install

script:
    - composer validate --strict --no-check-lock
    - ./vendor/bin/simple-phpunit -v

Use stable dependencies for Symfony 3
Use stable dependencies for Symfony 3
