sudo: false

language: php

php:
    - 7.4
    - 7.3
    - 7.2

matrix:
    include:
        - php: 7.2
          env: PREFER_LOWEST=1

install:
    - make vendor/installed
    - if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction; fi
    - travis_retry wget -O phive.phar https://phar.io/releases/phive.phar
    - travis_retry make tools/phpunit tools/readme-tester PHIVE_CMD="php phive.phar"

script:
    - tools/phpunit
    - tools/readme-tester README.md
