language: php

sudo: false

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

git:
  depth: 1

env:
  global:
    - PHPUNIT_VERSION="^5.4"

matrix:
  fast_finish: true
  include:
    - php: 5.6
      env:
        - COMPOSER_FLAGS="--prefer-stable"
    - php: 7
    - php: hhvm
  allow_failures:
    - php: hhvm

before_script:
  - travis_retry composer self-update --quiet
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
  - travis_retry composer require phpunit/phpunit:${PHPUNIT_VERSION}

script:
  - vendor/bin/phpunit

after_script:
  - bash -c '[[ -f "build/logs/clover.xml" ]] && wget https://scrutinizer-ci.com/ocular.phar'
  - bash -c '[[ -f "build/logs/clover.xml" ]] && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml'

language: php

sudo: false

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

git:
  depth: 1

env:
  global:
    - PHPUNIT_VERSION="^5.4"

matrix:
  fast_finish: true
  include:
    - php: 5.6
      env:
        - COMPOSER_FLAGS="--prefer-stable"
    - php: 7
    - php: hhvm
  allow_failures:
    - php: hhvm

before_script:
  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
  - travis_retry composer require phpunit/phpunit:${PHPUNIT_VERSION}

script:
  - vendor/bin/phpunit

after_script:
  - bash -c '[[ -f "build/logs/clover.xml" ]] && wget https://scrutinizer-ci.com/ocular.phar'
  - bash -c '[[ -f "build/logs/clover.xml" ]] && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml'

Remove composer self-update call in Travis
Remove composer self-update call in Travis

Travis VMs now do this by default. Removing it here reduces the build time by an average of 3-4 seconds.
