language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm
 
matrix:
  allow_failures:
    - php: 7.0
  include:
    - php: 5.4
      env: deps=low

env:
  global:
    - deps=no

install:
  - if [ "$deps" = "no" ]; then composer install; fi;
  - if [ "$deps" = "low" ]; then composer --prefer-lowest --prefer-stable update; fi;

script:
  - mkdir -p build/logs
  - ./vendor/bin/phpunit


after_script:
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then php vendor/bin/coveralls -v ; fi
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then wget https://scrutinizer-ci.com/ocular.phar ; fi
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml ; fi