language: php

jobs:
  include:
    - name: 'Tests under PHP 5.4'
      php: 5.4
      dist: trusty
    - name: 'Tests under PHP 5.5'
      php: 5.5
      dist: trusty
    - name: 'Tests under PHP 5.6'
      php: 5.6
      dist: trusty
    - name: 'Tests under PHP 7.0'
      php: 7.0
    - name: 'Tests under PHP 7.1'
      php: 7.1
    - name: 'Tests under PHP 7.2'
      php: 7.2
    - name: 'Tests under PHP 7.3'
      php: 7.3
    - name: 'Tests under PHP 7.4'
      php: 7.4
    # Waiting for Composer 2 compatible with PHP 8
    # - php: nightly

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

install:
    - composer install

script:
    - php -dmemory_limit=-1 ./vendor/phpunit/phpunit/phpunit --coverage-text --coverage-clover=coverage.clover

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

after_success:
    - bash <(curl -s https://codecov.io/bash)

language: php

jobs:
  include:
    - name: 'Tests under PHP 5.4'
      php: 5.4
      dist: trusty
    - name: 'Tests under PHP 5.5'
      php: 5.5
      dist: trusty
    - name: 'Tests under PHP 5.6'
      php: 5.6
      dist: trusty
    - name: 'Tests under PHP 7.0'
      php: 7.0
    - name: 'Tests under PHP 7.1'
      php: 7.1
    - name: 'Tests under PHP 7.2'
      php: 7.2
    - name: 'Tests under PHP 7.3'
      php: 7.3
    - name: 'Tests under PHP 7.4'
      php: 7.4
    - name: 'Tests under PHP 8'
      php: 8

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

install:
    - composer install

script:
    - php -dmemory_limit=-1 ./vendor/phpunit/phpunit/phpunit --coverage-text --coverage-clover=coverage.clover

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

after_success:
    - bash <(curl -s https://codecov.io/bash)

Add PHP 8 for unit tests
Add PHP 8 for unit tests
