language: php

php:
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm

env:
    global:
        - SYMFONY_DEPRECATIONS_HELPER: weak

sudo: false

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

matrix:
    fast_finish: true
    include:
        - php: 5.3
          env: COMPOSER_FLAGS="--prefer-lowest"
        - php: 7.0
          env: SYMFONY_VERSION=2.7.*
        - php: 7.0
          env: SYMFONY_VERSION=2.8.* COVERAGE=true
        - php: 7.0
          env: SYMFONY_VERSION=3.0.* SYMFONY_DEPRECATIONS_HELPER=strict

before_script:
    - composer self-update
    - if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony=$SYMFONY_VERSION; fi
    - composer update $COMPOSER_FLAGS --prefer-source

script: if [ "$COVERAGE" == "true" ]; then phpunit --coverage-clover=clover; else phpunit; fi

after_success:
    - if [ "$COVERAGE" == "true" ]; then curl -sL https://bit.ly/artifact-uploader | php; fi
