language: php

sudo: false

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

matrix:
    include:
        - php: 5.3
        - php: 5.4
        - php: 5.5
        - php: 5.6
        - php: hhvm
        - php: 7
    allow_failures:
        - php: hhvm
        - php: 7
    fast_finish: true

before_install:
    - composer self-update

install:
    - composer install --dev --prefer-source

script:
    - bin/phpunit

language: php

sudo: false

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

matrix:
    include:
        - php: 5.3
        - php: 5.4
        - php: 5.5
        - php: 5.6
        - php: hhvm
        - php: 7
    allow_failures:
        - php: hhvm
        - php: 7
    fast_finish: true

before_install:
    - composer self-update

install:
    - composer install

script:
    - bin/phpunit

Use the composer cache on Travis
Use the composer cache on Travis

When forcing a source install, the composer cache cannot be used, as it caches downloads only.