language: php

php:
  - 7.1
  - 7.2

matrix:
  include:
    - php: 7.1
      env: dependencies="--prefer-lowest"
    - php: 7.1
      env: CHECK_CODESTYLE=1
      before_install:
        - phpenv config-rm xdebug.ini
      before_script: ~
      script:
        - vendor/bin/php-cs-fixer fix --diff --dry-run -vvv
        - vendor/bin/phpstan.phar analyze ./src --level 7
      after_script: ~

install:
  - travis_retry composer self-update && composer --version
  - travis_retry composer update --no-interaction $DEPENDENCIES

before_script:
  - php dump-current.php
  - unset TRAVIS # Unset the variable to not interfere with tests

script:
  - vendor/bin/phpunit

after_script:
  - env # list current environment variables

language: php

php:
  - 7.1

matrix:
  include:
    - php: 7.1
      env: dependencies="--prefer-lowest"
    - php: 7.1
      env: CHECK_CODESTYLE=1
      before_install:
        - phpenv config-rm xdebug.ini
      before_script: ~
      script:
        - vendor/bin/php-cs-fixer fix --diff --dry-run -vvv
        - vendor/bin/phpstan.phar analyze ./src --level 7
      after_script: ~
  allow_failures:
    - php: 7.2

install:
  - travis_retry composer self-update && composer --version
  - travis_retry composer update --no-interaction $DEPENDENCIES

before_script:
  - php dump-current.php
  - unset TRAVIS # Unset the variable to not interfere with tests

script:
  - vendor/bin/phpunit

after_script:
  - env # list current environment variables

Allow failures of PHP 7.2RC6 build
Allow failures of PHP 7.2RC6 build

See https://github.com/sebastianbergmann/phpunit/issues/2853
