language: php

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

env:
    - COMPOSER_OPTS=""
    - COMPOSER_OPTS="--prefer-lowest"

matrix:
    allow_failures:
        - php: nightly
    exclude:
        - php: 5.6
          env: COMPOSER_OPTS="--prefer-lowest"
    fast_finish: true

sudo: false

before_install:
    - if [[ "$TRAVIS_PHP_VERSION" != "5.6" ]]; then composer require --dev --no-update phpunit/phpunit ~6 ; fi

before_script:
    - if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then pecl install mailparse-2.1.6 ; fi
    - if [[ "$TRAVIS_PHP_VERSION" != "5.6" ]]; then pecl install mailparse ; fi
    - composer self-update
    - composer update $COMPOSER_OPTS

script:
    - mkdir -p build/logs
    - ./vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
    - ./vendor/bin/phpcs src --standard=psr2
    - ./vendor/bin/phpcs tests --standard=psr2

after_script:
    - ./vendor/bin/coveralls -v

language: php

php:
    - 7.1
    - 7.2
    - 7.3
    - nightly

env:
    - COMPOSER_OPTS=""
    - COMPOSER_OPTS="--prefer-lowest"

matrix:
    allow_failures:
        - php: nightly
    fast_finish: true

sudo: false

before_script:
    - pecl install mailparse
    - composer self-update
    - composer update $COMPOSER_OPTS

script:
    - mkdir -p build/logs
    - ./vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
    - ./vendor/bin/phpcs src --standard=psr2
    - ./vendor/bin/phpcs tests --standard=psr2

after_script:
    - ./vendor/bin/coveralls -v

Remove support for PHP 5.6 and PHP 7.0
Remove support for PHP 5.6 and PHP 7.0