language: php

php:
  - 7.1
  - 7.2
  - nightly

env:
  - PACKAGES='symfony/symfony=2.8.*'
  - PACKAGES='symfony/symfony=3.2.*'
  - PACKAGES='symfony/symfony=3.3.*'
  - PACKAGES='symfony/symfony=3.4.*'
  - PACKAGES='symfony/symfony=4.0.*'
  - PACKAGES='symfony/symfony=4.1.*'

matrix:
  fast_finish: true
  allow_failures:
    - php: nightly
    - env: PACKAGES='symfony/symfony=4.1.*'
  include:
  - php: 7
    env: PACKAGES='symfony/symfony=2.8.*'
  - php: 7
    env: PACKAGES='symfony/symfony=3.2.*'
  - php: 7
    env: PACKAGES='symfony/symfony=3.3.*'
  - php: 7
    env: PACKAGES='symfony/symfony=3.4.*'

before_install:
  - travis_retry composer self-update

install:
  - composer require --no-update ${PACKAGES}
  - composer --prefer-dist install

script:
  - mkdir -p build
  - SERIALIZER=jms vendor/bin/phpunit --colors -c phpunit.xml
  - SERIALIZER=symfony vendor/bin/phpunit --colors -c phpunit.xml

language: php

php:
  - 7.1
  - 7.2
  - nightly

env:
  - PACKAGES='symfony/symfony=2.8.*'
  - PACKAGES='symfony/symfony=3.2.*'
  - PACKAGES='symfony/symfony=3.3.*'
  - PACKAGES='symfony/symfony=3.4.*'
  - PACKAGES='symfony/symfony=4.0.*'
  - PACKAGES='symfony/symfony=4.1.*'

matrix:
  fast_finish: true
  allow_failures:
    - php: nightly
    - env: PACKAGES='symfony/symfony=4.1.*'
    - env: PACKAGES='symfony/symfony=4.0.*'
  include:
  - php: 7
    env: PACKAGES='symfony/symfony=2.8.*'
  - php: 7
    env: PACKAGES='symfony/symfony=3.2.*'
  - php: 7
    env: PACKAGES='symfony/symfony=3.3.*'
  - php: 7
    env: PACKAGES='symfony/symfony=3.4.*'

before_install:
  - travis_retry composer self-update

install:
  - composer require --no-update ${PACKAGES}
  - composer --prefer-dist install

script:
  - mkdir -p build
  - SERIALIZER=jms vendor/bin/phpunit --colors -c phpunit.xml
  - SERIALIZER=symfony vendor/bin/phpunit --colors -c phpunit.xml

Allow 4.0 fail for the moment
Allow 4.0 fail for the moment
