dist: xenial
os: linux
language: php

# avoid double Travis build when the PR is created on upstream
if: |
    type = pull_request OR \
    branch = master

php:
    - nightly

jobs:
    allow_failures:
        - php: nightly

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

before_install:
    - composer config github-oauth.github.com ${GH_TOKEN}

install:
    - composer update --prefer-dist --no-progress -o

before_script:
    - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

script:
    - mkdir -p build/logs
    - php vendor/bin/simple-phpunit -v

dist: xenial
os: linux
language: php

# avoid double Travis build when the PR is created on upstream
if: |
    type = pull_request OR \
    branch = master

php:
    - 8.0

jobs:
    allow_failures:
        - php: 8.0

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

before_install:
    - composer config github-oauth.github.com ${GH_TOKEN}

install:
    - composer remove friendsofphp/php-cs-fixer --dev --no-interaction
    - composer update --prefer-dist --no-progress -o

before_script:
    - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

script:
    - mkdir -p build/logs
    - php vendor/bin/simple-phpunit -v

Test on stable PHP 8.0
Test on stable PHP 8.0
