language: php

php:
  - 5.5
  - 5.6
  - 7.0
  - 7.1

before_script:
  - curl -s http://getcomposer.org/installer | php
  - php composer.phar install --dev

script: phpunit

language: php

php:
- 5.5
- 5.6
- 7.0
- 7.1

env:
  matrix:
  - DEPENDENCIES=latest
  - DEPENDENCIES=oldest

install:
- >
  echo;
  if [ "$DEPENDENCIES" = "latest" ]; then
    echo "Installing the latest dependencies";
    composer update --with-dependencies --prefer-stable --prefer-dist
  else
    echo "Installing the lowest dependencies";
    composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest
  fi;
  composer show;

script: phpunit

Test with both latest and oldest dependencies
[TASK] Test with both latest and oldest dependencies

This ensures that our dependency versions given in the composer.json always
provide a working set of packages.
