language: php

sudo: false

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

php:
    - 5.5
    - 5.6
    - 7.0
    - 7.1

matrix:
    include:
        - php: 7.1
          env: DEPENDENCIES=dev
        - php: 5.5
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'

before_install:
    - phpenv config-rm xdebug.ini || true
    - composer self-update
    - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;

install: composer update --prefer-dist $COMPOSER_FLAGS

# Fail CI if repo is in dirty state after bin/update_readme
before_script:
    - ./bin/update_readme
    - git diff --exit-code README.md

script: ./vendor/bin/phpunit

language: php

sudo: false

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

php:
    - 5.5
    - 5.6
    - 7.0
    - 7.1

matrix:
    include:
        - php: 7.1
          env: DEPENDENCIES=dev
        - php: 5.5
          env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'

before_install:
    - phpenv config-rm xdebug.ini || true
    - composer self-update
    - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;

install: composer update --prefer-dist $COMPOSER_FLAGS

# Fail CI if repo is in dirty state after bin/update_readme
before_script: ./bin/update_readme && git diff --exit-code README.md

script: ./vendor/bin/phpunit

Revert "Try to split commands in a few steps" - unnecessary
Revert "Try to split commands in a few steps" - unnecessary

This reverts commit b31935678eab8fb1c037d71faea7bd9118555b7c.
