language: php

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

env:
  - SYMFONY_VERSION='2.7.*'

matrix:
  include:
    - php: 5.3.3
      env: DEPS='lowest'
    - php: 5.6
      env: DEPS='unmodified'
    - php: 5.6
      env: SYMFONY_VERSION='2.3.*' SYMFONY_DEPRECATIONS_HELPER='666'
    - php: 5.6
      env: SYMFONY_VERSION='2.7.*' PARAM_DB_DRIVER='pdo_mysql'
    - php: 5.6
      env: SYMFONY_VERSION='2.8.*'
    - php: 5.6
      env: SYMFONY_VERSION='3.1.*'
    - php: 5.6
      env: SYMFONY_VERSION='3.2.*'
    - php: 5.6
      env: SYMFONY_VERSION='3.3.*' MIN_STABILITY='dev'
  allow_failures:
    - env: SYMFONY_VERSION='3.3.*' MIN_STABILITY='dev'
  fast_finish: true

install:
  - if [ "${TRAVIS_PHP_VERSION}" != 'hhvm' ]; then phpenv config-rm xdebug.ini; fi;
  - if [ "${TRAVIS_PHP_VERSION}" != 'hhvm' ]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi;
  - echo "memory_limit = -1" >> "${INI_FILE}"
  - travis_wait bash .travis_install_dependencies.sh

before_script:
  - if [ "${PARAM_DB_DRIVER:-}" = 'pdo_mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS test;'; fi;

script: vendor/bin/phpunit -v

notifications:
  email:
    on_success: always
    on_failure: always

# use container-based infrastructure
sudo: false

# cache Composer's package cache
cache:
  directories:
    - $HOME/.composer/cache/files
    - vendor
