language: php

php:
  - 5.3
  - 5.4
  - 5.5
  - hhvm

services:
  - memcached
  - mongodb
  - redis-server

before_script:
  - echo "extension=mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - echo "extension=apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - wget https://getcomposer.org/composer.phar
  - php composer.phar install --dev --prefer-source
  # must be set after composer to avoid issue with autoloading
  - echo "apc.enable_cli=On" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

script: phpunit

notifications:
    webhooks: https://sonata-project.org/bundles/cache/master/travis

matrix:
  allow_failures:
    - php: hhvm
