language: php

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

install:
  - travis_retry composer install --prefer-dist

before_script:
  - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" && "$TRAVIS_PHP_VERSION" != "7.0" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;

script:
  - phpunit --coverage-clover=coverage.clover

after_script:
  - 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 coverage.clover; fi;

cache:
    directories:
        - $HOME/.composer


language: php

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

matrix:
  include:
    - php: 5.6
      env: dependencies=lowest
    - php: 7
      env: dependencies=lowest
    - php: 5.6
      env: dependencies=highest
    - php: 7
      env: dependencies=highest

install:
  - if [ -z "$dependencies" ]; then travis_retry composer install --prefer-dist; fi;
  - if [ "$dependencies" = "lowest" ]; then travis_retry composer update --prefer-dist --prefer-lowest -n; fi;
  - if [ "$dependencies" = "highest" ]; then travis_retry composer update --prefer-dist -n; fi;

before_script:
  - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" && "$TRAVIS_PHP_VERSION" != "7.0" ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;

script:
  - phpunit --coverage-clover=coverage.clover

after_script:
  - 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 coverage.clover; fi;

cache:
    directories:
        - $HOME/.composer


Add build matrix for Travis
Add build matrix for Travis

This way we test with the lowest and highest dependencies on Travis.
