language: php
sudo: false
cache:
  directories:
    - $HOME/.composer/cache/files

matrix:
  include:
    - php: 7.0
      env: 
        - DEPS="low"
    - php: 7.0
      env: 
        - DEPS="lock"
    - php: 7.0
      env: 
        - TEST_COVERAGE=true
    - php: 7.1
    - php: nightly
  fast_finish: true
  allow_failures:
    - php: nightly

install:
  - phpenv config-rm xdebug.ini

  - if [[ $DEPS == "low" ]]; then composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction; fi
  - if [[ $DEPS == "lock" ]]; then composer install --prefer-dist --no-interaction; fi
  - if [[ -z $DEPS ]]; then composer update --prefer-dist --prefer-stable --no-interaction; fi

script:
  - if [[ $TEST_COVERAGE ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml; else vendor/bin/phpunit; fi

after_success:
  - if [[ $TEST_COVERAGE ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

language: php
sudo: false
cache:
  directories:
    - $HOME/.composer/cache/files

matrix:
  include:
    - php: 7.0
      env: 
        - DEPS="low"
    - php: 7.0
      env: 
        - DEPS="lock"
    - php: 7.0
      env: 
        - TEST_COVERAGE=true
    - php: 7.1
    - php: 7.2
    - php: nightly
  fast_finish: true
  allow_failures:
    - php: nightly

before_install:
  - phpenv config-rm xdebug.ini || echo "xDebug not disabled!"

install:
  - if [[ $DEPS == "low" ]]; then composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction; fi
  - if [[ $DEPS == "lock" ]]; then composer install --prefer-dist --no-interaction; fi
  - if [[ -z $DEPS ]]; then composer update --prefer-dist --prefer-stable --no-interaction; fi

script:
  - if [[ $TEST_COVERAGE ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml; else vendor/bin/phpunit; fi

after_success:
  - if [[ $TEST_COVERAGE ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

Add PHP 7.2 to build matrix; ignore if xDebug cannot be disabled
Add PHP 7.2 to build matrix; ignore if xDebug cannot be disabled
