language: php
os: linux
cache:
  directories:
    - $HOME/.composer/cache/files

php:
  - 7.0
  - 7.1
  - 7.2
  - 7.3
  - 7.4

install:
  - composer update --prefer-dist --prefer-stable --no-interaction

script: >-
  vendor/bin/phpunit --coverage-clover=build/coverage-report.xml &&
  bash <(curl -s https://codecov.io/bash) -f build/coverage-report.xml

jobs:
  fast_finish: true
  include:
    - name: Lowest deps
      php: 7.0
      install: composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction
    - name: Composer 2
      php: 7.0
      before_install: composer self-update --snapshot

language: php
os: linux
cache:
  directories:
    - $HOME/.composer/cache/files

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

install:
  - composer update --prefer-dist --prefer-stable --no-interaction

script: >-
  vendor/bin/phpunit --coverage-clover=build/coverage-report.xml &&
  bash <(curl -s https://codecov.io/bash) -f build/coverage-report.xml

jobs:
  fast_finish: true
  include:
    - name: Lowest deps
      php: 7.0
      install: composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction
    - name: Composer 2
      php: 7.0
      before_install: composer self-update --snapshot
    - stage: Additional checks
      name: Backward compatibility check
      php: 7.4
      script:
        - composer require --dev roave/backward-compatibility-check
        - vendor/bin/roave-backward-compatibility-check

Add PHP 8 and BC check to CI
Add PHP 8 and BC check to CI
