# use ubuntu trusty for old versions of PHP
dist: trusty

language: php

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

sudo: true

# cache vendor dirs
cache:
  directories:
    - $HOME/.composer/cache

install:
  - travis_retry composer self-update && composer --version
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
  - travis_retry composer install --prefer-dist --no-interaction
  - travis_retry composer require "phpunit/phpunit:4.8.27|^5.0|^6.0" --update-with-dependencies

script:
  - vendor/bin/phpunit $PHPUNIT_FLAGS
