language: php

php:
  - 5.5
  - hhvm

env:
  - SYMFONY_VERSION=2.4.*
  - SYMFONY_VERSION=2.5.*
  - SYMFONY_VERSION=2.6.*@dev

allow_failures:
  - php: hhvm

install:
  - composer install

before_script:
  - composer require --prefer-source --dev symfony/symfony:${SYMFONY_VERSION}

script: sh -c "if [ \"$TRAVIS_PHP_VERSION\" = '5.5' -a \"$SYMFONY_VERSION\" = '2.5.*' ]; then phpunit --coverage-clover=coverage.clover; else phpunit; fi"

after_script:
  - sh -c "if [ \"$TRAVIS_PHP_VERSION\" = '5.5' -a \"$SYMFONY_VERSION\" = '2.5.*' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
  - sh -c "if [ \"$TRAVIS_PHP_VERSION\" = '5.5' -a \"$SYMFONY_VERSION\" = '2.5.*' ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"

cache:
  directories:
    - $COMPOSER_CACHE_DIR

language: php

php:
  - 5.5
  - hhvm

env:
  - SYMFONY_VERSION=2.4.*
  - SYMFONY_VERSION=2.5.*
  - SYMFONY_VERSION=2.6.*@dev

allow_failures:
  - php: hhvm

install:
  - composer install --dev

before_script:
  - composer require --prefer-source --dev symfony/symfony:${SYMFONY_VERSION}

script: sh -c "if [ \"$TRAVIS_PHP_VERSION\" = '5.5' -a \"$SYMFONY_VERSION\" = '2.5.*' ]; then ./vendor/bin/phpunit --coverage-clover=coverage.clover; else ./vendor/bin/phpunit; fi"

after_script:
  - sh -c "if [ \"$TRAVIS_PHP_VERSION\" = '5.5' -a \"$SYMFONY_VERSION\" = '2.5.*' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
  - sh -c "if [ \"$TRAVIS_PHP_VERSION\" = '5.5' -a \"$SYMFONY_VERSION\" = '2.5.*' ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"

cache:
  directories:
    - $COMPOSER_CACHE_DIR

Use phpunit from composer to do build
Use phpunit from composer to do build
