language: php

cache:
  directories:
    - $COMPOSER_CACHE_DIR

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

allow_failures:
  - php: hhvm

env:
  - SYMFONY_VERSION=2.4.*
  - SYMFONY_VERSION=2.5.*
  - SYMFONY_VERSION=2.6.*
  - SYMFONY_VERSION=2.7.*
  - SYMFONY_VERSION=2.8.*
  - SYMFONY_VERSION=3.0.*

matrix:
  #Symfony 3.0 requires PHP 5.5
  exclude:
    - php: 5.4
      env: SYMFONY_VERSION=3.0.*
  fast_finish: true
  allow_failures:
    - php: hhvm

before_install:
  - composer self-update
  - composer require --no-update symfony/expression-language "$SYMFONY_VERSION"
  - composer require --no-update --dev symfony/yaml "$SYMFONY_VERSION"
  - composer require --no-update --dev symfony/routing "$SYMFONY_VERSION"
  - composer require --no-update --dev symfony/dependency-injection "$SYMFONY_VERSION"

install:
    - composer install --no-interaction --prefer-dist

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