language: php

sudo: false

matrix:
    include:
        - php: 7.0
        - php: 7.1
        - php: 7.2
        - php: 7.0
          env: COMPOSER_FLAGS="--prefer-lowest"

before_script:
  - curl --version
  - composer self-update
  - composer update --no-interaction --no-progress $COMPOSER_FLAGS

script:
  - ./vendor/bin/phpunit -v --coverage-text --coverage-clover=coverage.clover

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

#
#
#after_success:
#  - if  [ $TRAVIS_PHP_VERSION = '7.1' ] && [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ] && [ $COMPOSER_FLAGS = '']; then sh bin/generate-api; fi

language: php

sudo: false

matrix:
    include:
     - php: 7.0
     - php: 7.1
     - php: 7.2
     - php: 7.0
       env: COMPOSER_FLAGS="--prefer-lowest"
    allow_failures:
     - php: 7.2

before_script:
  - curl --version
  - composer self-update
  - composer update --no-interaction --no-progress $COMPOSER_FLAGS

script:
  - ./vendor/bin/phpunit -v --coverage-text --coverage-clover=coverage.clover

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

#
#
#after_success:
#  - if  [ $TRAVIS_PHP_VERSION = '7.1' ] && [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ] && [ $COMPOSER_FLAGS = '']; then sh bin/generate-api; fi

Add PHP 7.2 to allowed fails until crash is resolved upstream
Add PHP 7.2 to allowed fails until crash is resolved upstream
