language: php

sudo: false

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

env:
  global:
    - SYMFONY_VERSION=""
    - TWIG_VERSION=""

php:
  - 5.5
  - 5.6
  - 7.0
  - hhvm

matrix:
  include:
    - php: 5.6
      env: SYMFONY_VERSION="2.3.x"
    - php: 5.6
      env: SYMFONY_VERSION="2.8.x symfony/phpunit-bridge:^2.7"
    - php: 5.6
      env: SYMFONY_VERSION="3.0.x"
    - php: 5.6
      env: SYMFONY_VERSION="dev-master"
    - php: 5.6
      env: TWIG_VERSION="2.0.x-dev"
  fast_finish: true
  allow_failures:
    - php: hhvm
    - env: TWIG_VERSION="2.0.x-dev"
    - env: SYMFONY_VERSION="dev-master"

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

install: composer update --prefer-dist

script: phpunit
