language: php

matrix:
  include:
    - php: 5.3
      env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
    - php: 7.1
    - php: 7.1
      env: SYMFONY_VERSION='2.8.*'

sudo: false

cache:
  directory:
    - .phpunit
    - $HOME/.composer/cache/files

before_install:
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
  - if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony=$SYMFONY_VERSION; fi

install:
  - composer update $COMPOSER_FLAGS --prefer-dist
  - npm install google-closure-library

script:
  - ./phpunit
  - phantomjs Resources/js/run_jsunit.js Resources/js/router_test.html

notifications:
  email:
    - friendsofsymfony-dev@googlegroups.com
