sudo: false
language: php

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

matrix:
  allow_failures:
    - php: 7
  include:
    - php: 7.0
      env: PHPUNIT_VERSION='5.0.0'
    - php: 7.1
      env: PHPUNIT_VERSION='5.0.0'
    - php: hhvm
      dist: trusty
      env: PHPUNIT_VERSION='4.8.36'

php:
    - 5.3
    - 5.4
    - 5.5
    - 5.6

install:
    - if [ "$PHPUNIT_VERSION" != "" ]; then composer require phpunit/phpunit:$PHPUNIT_VERSION --prefer-dist --no-interaction; fi;
    - if [ "$PHPUNIT_VERSION" == "" ]; then composer install --prefer-dist --no-interaction; fi;

before_script:
    - mkdir -p build/logs

script:
    - if [ "$PHPUNIT_VERSION" != "" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi;
    - if [ "$PHPUNIT_VERSION" == "" ]; then phpunit --coverage-clover build/logs/clover.xml; fi;

after_success:
    - bash <(curl -s https://codecov.io/bash)

after_script:
    - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar -t 3; fi;
    - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi;

sudo: false
language: php

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

matrix:
  include:
    - php: 5.3
      dist: trusty

php:
    - 5.4
    - 5.5
    - 5.6
    - 7.0
    - 7.1
    - 7.2

install:
    composer install --prefer-dist --no-interaction

before_script:
    - mkdir -p build/logs

script:
    phpunit --coverage-clover build/logs/clover.xml

after_success:
    - bash <(curl -s https://codecov.io/bash)

after_script:
    - wget https://scrutinizer-ci.com/ocular.phar -t 3
    - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

Drop HHVM support and test on all PHP 7.x versions
Drop HHVM support and test on all PHP 7.x versions
