language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - hhvm

matrix:
  fast_finish: true
  include:
    # Test against Symfony LTS versions
    - php: 5.6
      env: SYMFONY_VERSION="2.7.*"
    - php: 5.6
      env: SYMFONY_VERSION="2.8.*"
    # Test against dev versions
    - php: 5.6
      env: DEPENDENCIES=dev
  allow_failures:
    - php: hhvm

sudo: false

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

before_install:
  - composer self-update
  - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;

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

script:
  - ./vendor/bin/phpunit -v --coverage-text

language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - hhvm

env:
  global:
    - COVERALLS_EXECUTION_PHP_VERSION="7.1"

matrix:
  fast_finish: true
  include:
    # Test against Symfony LTS versions
    - php: 5.6
      env: SYMFONY_VERSION="2.7.*"
    - php: 5.6
      env: SYMFONY_VERSION="2.8.*"
    # Test against dev versions
    - php: 5.6
      env: DEPENDENCIES=dev
  allow_failures:
    - php: hhvm

sudo: false

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

before_install:
  - composer self-update
  - if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then composer require "satooshi/php-coveralls:^1.0" -n; fi
  - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;

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

script:
  - if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then mkdir -p build/logs/; fi
  - if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then ./vendor/bin/phpunit -v --coverage-text --coverage-clover build/logs/clover.xml; fi
  - if [[ $(phpenv version-name) != "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then ./vendor/bin/phpunit -v --coverage-text; fi

after_script:
  - if [[ $(phpenv version-name) == "$COVERALLS_EXECUTION_PHP_VERSION" ]]; then ./vendor/bin/coveralls -v; fi

Update Travis CI config to enable Coveralls
Update Travis CI config to enable Coveralls
