language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - hhvm

sudo: false

matrix:
  include:
    - php: 5.5
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
    - php: 5.6
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
    - php: 7.0
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
    - php: 7.1
      env: COMPOSER_FLAGS='--prefer-latest'
    - php: hhvm
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
  fast_finish: true

before_install:
  - travis_retry composer self-update

install:
  - |
    if [[ "$COMPOSER_FLAGS" == "--prefer-latest" ]]; then
        composer config minimum-stability dev
        composer config prefer-stable false

        export COMPOSER_FLAGS=""
    fi;

  - travis_retry composer update $COMPOSER_FLAGS --prefer-source

script:
  - mkdir -p build/logs
  - ./vendor/bin/parallel-lint src tests
  - ./vendor/bin/phpunit --verbose
  - ./vendor/bin/phpcs src tests --standard=psr2 -sp

after_script:
  - php vendor/bin/coveralls

notifications:
  webhooks:
    urls:
      - 'https://webhooks.gitter.im/e/f3356db3405001e47b5e'
    on_success: change
    on_failure: always
    on_start: false

language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - nightly

sudo: false

matrix:
  include:
    - php: 5.5
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
    - php: 5.6
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
    - php: 7.0
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
    - php: 7.1
      env: COMPOSER_FLAGS='--prefer-latest'
    - php: nightly
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
  fast_finish: true
  allow_failures:
    - php: nightly

before_install:
  - travis_retry composer self-update

install:
  - |
    if [[ "$COMPOSER_FLAGS" == "--prefer-latest" ]]; then
        composer config minimum-stability dev
        composer config prefer-stable false

        export COMPOSER_FLAGS=""
    fi;

  - travis_retry composer update $COMPOSER_FLAGS --prefer-source

before_script:
  - mkdir -p build/logs

script:
  - ./vendor/bin/parallel-lint src tests
  - ./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml
  - ./vendor/bin/phpcs src tests --standard=psr2 -sp

after_script:
  - travis_retry php vendor/bin/coveralls

Remove HHVM from build matrix and modernize Travis script
Remove HHVM from build matrix and modernize Travis script
