language: php

matrix:
  include:
    - php: 5.6
      env: COMPOSER_FLAGS="--prefer-lowest"
    - php: 5.6
    - php: 7.0
      env: SYMFONY_VERSION='2.7.*'
    - php: 7.0
      env: SYMFONY_VERSION='2.8.*'
    - php: 7.0
      env: SYMFONY_VERSION='3.0.*'
    - php: hhvm
  allow_failures:
    - php: hhvm

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

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

install:
  - composer update $COMPOSER_FLAGS --prefer-source --optimize-autoloader

before_script:
  - mkdir -p build/logs

script:
  - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
  - ./vendor/bin/phpcs --standard=PSR2 ./src/
  - ./vendor/bin/phpcs --standard=PSR2 ./test/

after_script:
  - bash <(curl -s https://codecov.io/bash)
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml

language: php

matrix:
  include:
    - php: 5.6
      env: COMPOSER_FLAGS="--prefer-lowest"
    - php: 5.6
    - php: 7.0
      env: SYMFONY_VERSION='2.7.*'
    - php: 7.0
      env: SYMFONY_VERSION='2.8.*'
    - php: 7.0
      env: SYMFONY_VERSION='3.0.*'
    - php: hhvm
  allow_failures:
    - php: hhvm

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

install:
  - composer update $COMPOSER_FLAGS --prefer-source --optimize-autoloader

before_script:
  - mkdir -p build/logs

script:
  - ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
  - ./vendor/bin/phpcs --standard=PSR2 ./src/
  - ./vendor/bin/phpcs --standard=PSR2 ./test/

after_script:
  - bash <(curl -s https://codecov.io/bash)
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml

Remove cache - having troubles updating nikic/php-parser due to permissions on binary
Remove cache - having troubles updating nikic/php-parser due to permissions on binary