language: php

# Run on container environment (needed for trais caching feature)
sudo: false

matrix:
  include:
      - php: 5.3
        env: DEPENDENCIES='low'
      - php: 5.3
      - php: 5.4
      - php: 5.5
      - php: 5.6

# Cache composer files for faster test times
cache:
  directories:
    - vendor
    - $HOME/.composer/cache

before_install:
  # Remove xdebug module as it is not required but slows down composer and phpunit
  - phpenv config-rm xdebug.ini
  # Attempt to use Github oAuth token, if available, to avoid their public ratelimit
  - if [ -n "$GH_ACCESS_TOKEN" ]; then git config --global github.accesstoken $GH_ACCESS_TOKEN; fi;
  # Composer only updated in TravisCI containers when they build their images every month or so
  - composer self-update

install:
  - if [ -z "$DEPENDENCIES" ]; then composer install --no-interaction --prefer-dist; fi;
  - if [ "$DEPENDENCIES" == "low" ]; then composer update --no-interaction  --prefer-dist --prefer-lowest; fi;

script:
  - phpunit
  

language: php

# Run on container environment (needed for trais caching feature)
sudo: false

matrix:
  fast_finish: true
  include:
      - php: 5.3
        env: DEPENDENCIES='low'
      - php: 5.3
      - php: 5.4
      - php: 5.5
      - php: 5.6
      - php: 7.0
      - php: hhvm
  allow_failures:
      - php: 7.0
      - php: hhvm

# Cache composer files for faster test times
cache:
  directories:
    - vendor
    - $HOME/.composer/cache

before_install:
  # Remove xdebug module as it is not required but slows down composer and phpunit
  - phpenv config-rm xdebug.ini
  # Attempt to use Github oAuth token, if available, to avoid their public ratelimit
  - if [ -n "$GH_ACCESS_TOKEN" ]; then git config --global github.accesstoken $GH_ACCESS_TOKEN; fi;
  # Composer only updated in TravisCI containers when they build their images every month or so
  - composer self-update

install:
  - if [ -z "$DEPENDENCIES" ]; then composer install --no-interaction --prefer-dist; fi;
  - if [ "$DEPENDENCIES" == "low" ]; then composer update --no-interaction  --prefer-dist --prefer-lowest; fi;

script:
  - phpunit
  

Add PHP 7 and HHVM to target test environments
Add PHP 7 and HHVM to target test environments
