language: php

dist: trusty

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

matrix:
  include:
    # PHP 5.3 doesn't install on Trusty on Travis: https://github.com/travis-ci/travis-ci/issues/8219
    - php: 5.3
      dist: precise
    # Force testing against LTS versions
    - php: 5.6
      env: SYMFONY_VERSION=2.3.*
    - php: 5.6
      env: SYMFONY_VERSION=2.7.*
    - php: 5.6
      env: SYMFONY_VERSION=2.8.*
    - php: 5.6
      env: SYMFONY_VERSION=3.0.*

sudo: false

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

before_install:
  - composer self-update
  - if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony=$SYMFONY_VERSION; fi
  - INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini;
  - echo memory_limit = -1 >> $INI_FILE

install:
  - composer install

script: php tests.php
