sudo: false
language: php

php:
  - 7.2
  - 7.3
  - 7.4snapshot
  - nightly

env:
  - DEPENDENCIES=default
  - DEPENDENCIES=lowest
  - DEPENDENCIES=highest

cache:
  directories:
    - $HOME/.composer/cache/files

matrix:
  fast_finish: true
  allow_failures:
    - php: nightly
    - php: 7.4snapshot

install:
  - phpenv config-rm xdebug.ini
  - if [ "$DEPENDENCIES" = "default" ]; then composer install --prefer-dist; fi;
  - if [ "$DEPENDENCIES" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
  - if [ "$DEPENDENCIES" = "highest" ]; then composer update --prefer-dist -n; fi;
  - composer show

script:
  - vendor/bin/phpunit

jobs:
  include:
    - stage: analyze
      name: phpstan
      script:
        - vendor/bin/phpstan analyze

    - stage: analyze
      name: Code style
      script:
        - vendor/bin/phpcs

    - stage: analyze
      name: code coverage
      script:
        - vendor/bin/phpunit --coverage-text
        - composer require php-coveralls/php-coveralls
        - travis_retry vendor/bin/php-coveralls

sudo: false
language: php

php:
  - 7.2
  - 7.3
  - 7.4snapshot
  - nightly

env:
  - DEPENDENCIES=default
  - DEPENDENCIES=lowest
  - DEPENDENCIES=highest

cache:
  directories:
    - $HOME/.composer/cache/files

matrix:
  fast_finish: true
  allow_failures:
    - php: nightly
    - php: 7.4snapshot

install:
  - if [ "$DEPENDENCIES" = "default" ]; then composer install --prefer-dist; fi;
  - if [ "$DEPENDENCIES" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
  - if [ "$DEPENDENCIES" = "highest" ]; then composer update --prefer-dist -n; fi;
  - composer show

script:
  - phpenv config-rm xdebug.ini || true
  - vendor/bin/phpunit

jobs:
  include:
    - stage: analyze
      name: phpstan
      script:
        - vendor/bin/phpstan analyze

    - stage: analyze
      name: Code style
      script:
        - vendor/bin/phpcs

    - stage: analyze
      name: code coverage
      script:
        - vendor/bin/phpunit --coverage-text
        - composer require php-coveralls/php-coveralls
        - travis_retry vendor/bin/php-coveralls

Move xdebug remove to script
Move xdebug remove to script
