language: php

sudo: false

git:
    depth: 1

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

env:
  global:
  - TARGET=test

matrix:
    include:
        - php: 7.2
          env: PHPUNIT_FLAGS='--coverage-clover clover'
        - php: 7.2
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
        - php: 7.2
          env: TARGET=docs
        - php: 7.2
          env: TARGET=cs

        - php: 7.3
        - php: 7.4

        - php: 7.4
          env: VERY_LATEST=1
    fast_finish: true

install:
  - if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi;

script:
  - if [ -x .travis/script_${TARGET}.sh ]; then .travis/script_${TARGET}.sh; fi;

after_success:
  - if [ -x .travis/sucess_${TARGET}.sh ]; then .travis/sucess_${TARGET}.sh; fi;

language: php

git:
    depth: 1

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

env:
  global:
  - TARGET=test

matrix:
    include:
        - php: 7.2
          env: PHPUNIT_FLAGS='--coverage-clover clover'
        - php: 7.2
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
        - php: 7.2
          env: TARGET=docs
        - php: 7.2
          env: TARGET=cs

        - php: 7.3
        - php: 7.4

        - php: 7.4
          env: VERY_LATEST=1
    fast_finish: true

install:
  - if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi;

script:
  - if [ -x .travis/script_${TARGET}.sh ]; then .travis/script_${TARGET}.sh; fi;

after_success:
  - if [ -x .travis/sucess_${TARGET}.sh ]; then .travis/sucess_${TARGET}.sh; fi;

Add Composer cache for v2
Add Composer cache for v2

Composer v1 and v2 store caches in different places:

    $HOME/.composer/cache
    $HOME/.cache/composer

Can be verified with:

    composer --global config cache-dir
