language: php

php:
  - 7.1
  - 7.2
  - 7.3

env:
  - SYMFONY_VERSION=3.4.*
  - SYMFONY_VERSION=^4
  - SYMFONY_VERSION=^5
  - SYMFONY_VERSION=dev-master

before_script:
  - composer require symfony/dom-crawler:${SYMFONY_VERSION}
  - composer require symfony/css-selector:${SYMFONY_VERSION}

script: vendor/bin/phpunit --coverage-clover=coverage.clover

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

matrix:
  allow_failures:
    - env: SYMFONY_VERSION=dev-master
  exclude:
    - env: SYMFONY_VERSION=^5
      php: 7.1
    - env: SYMFONY_VERSION=dev-master
      php: 7.1


