language: php

cache: vendor

php:
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - hhvm
  - nightly

env:
  - SYMFONY_VERSION=2.6.*

matrix:
  include:
    - php: 5.3.3
      env: SYMFONY_VERSION=2.3.* COMPOSER_FLAGS="--prefer-lowest"
    - php: 5.6
      env: SYMFONY_VERSION=2.3.*
    - php: 5.6
      env: SYMFONY_VERSION=2.5.*
    - php: 5.6
      env: SYMFONY_VERSION=2.7.*@dev
  allow_failures:
    - php: hhvm
    - env: SYMFONY_VERSION=2.7.*@dev
    - php: nightly


before_script:
  - composer require symfony/symfony:${SYMFONY_VERSION} --prefer-source
  - composer install --dev --prefer-source
  - sudo pip install -r Resources/doc/requirements.txt

script: make test

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