language: php

sudo: false

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

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

matrix:
  include:
    - php: 5.6
      env: SYMFONY_VERSION="2.8.*@dev symfony/phpunit-bridge:~2.7"
    - php: 5.6
      env: SYMFONY_VERSION="3.0.*@dev"
  allow_failures:
    - php: 7.0
  fast_finishe: true

before_install:
  - wget http://cs.sensiolabs.org/get/php-cs-fixer.phar
  - composer self-update
  - if [[ "$SYMFONY_VERSION" != "" ]]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi

install:
  - composer install --optimize-autoloader --prefer-source

script:
  - php php-cs-fixer.phar fix --dry-run --verbose --diff . || true;
  - bin/phpunit --verbose
