language: php

sudo: false

cache:
    directory:
        - $HOME/.composer/cache/files

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

matrix:
    include:
        - php: 5.3
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak
        - php: 5.6
          env: DEPENDENCIES='dev' SYMFONY_VERSION='2.8.*@dev'
        - php: 5.6
          env: SYMFONY_VERSION='2.3.*'
        - php: 5.6
          env: SYMFONY_VERSION='3.0.*@dev'

before_install:
    - composer self-update # remove this once the Travis upgrade of February 2015 is deployed
    - if [ "$DEPENDENCIES" == "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
    - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION}; fi;

install: composer update $COMPOSER_FLAGS

script: phpunit -v
