# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

language: php

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

sudo: false

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

env:
  global:
    - PATH="$HOME/.composer/vendor/bin:$HOME/.local/bin:$PATH"
    - SYMFONY_DEPRECATIONS_HELPER=weak
    - TARGET=test

matrix:
  fast_finish: true
  include:
    - php: '5.6'
      env: TARGET=docs
    - php: '5.3'
      env: COMPOSER_FLAGS="--prefer-lowest"
    - php: '5.6'
      env: SYMFONY_VERSION=2.3.*
    - php: '5.6'
      env: SYMFONY_VERSION=2.6.*
    - php: '5.6'
      env: SYMFONY_VERSION=2.7.*
    - php: '5.6'
      env: SYMFONY_VERSION=2.8.*
    - php: '5.6'
      env: SYMFONY_VERSION=dev-master@dev
    - php: '5.6'
      env: SYMFONY_DEPRECATIONS_HELPER=0
  allow_failures:
    - php: nightly
    - php: hhvm
    - env: SYMFONY_DEPRECATIONS_HELPER=0
    - env: SYMFONY_VERSION=dev-master@dev

before_install:
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then mv "$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" /tmp; fi;
  - composer config --quiet --global github-oauth.github.com $GITHUB_OAUTH_TOKEN
  - composer global require phpunit/phpunit:@stable --no-update
  - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;

install:
  - travis_wait composer global update --prefer-dist --no-interaction
  - travis_wait composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
  - pip install -r Resources/doc/requirements.txt --user `whoami`

before_script:
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then mv /tmp/xdebug.ini "$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d"; fi;

script: make $TARGET
