language: php
php:
  - '7.2'
  - '7.3'
  - '8.0'

env:
  global:
    - SYMFONY_VERSION="~5.0" ES_FILENAME_SUFFIX="-linux-x86_64"
  matrix:
    - ES_VERSION="7.2.1"
    - ES_VERSION="7.2.1" SYMFONY_VERSION="~4.4"
    - ES_VERSION="7.11.1"
    - ES_VERSION="7.11.1" SYMFONY_VERSION="~4.4"

install:
  - composer require --no-update symfony/framework-bundle:${SYMFONY_VERSION}
  - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}${ES_FILENAME_SUFFIX}.tar.gz
  - tar -xzf elasticsearch-${ES_VERSION}${ES_FILENAME_SUFFIX}.tar.gz
  - ./elasticsearch-${ES_VERSION}/bin/elasticsearch > /dev/null 2>&1 &
  - composer install --dev --no-interaction

script:
  - vendor/bin/simple-phpunit --coverage-clover=Tests/App/build/clover.xml 2>/dev/null
  - vendor/bin/phpcs -np --standard=PSR2 --ignore=vendor/,Tests/App/,var/ ./

after_script:
  - travis_retry php vendor/bin/php-coveralls -v

language: php
php:
  - '7.2'
  - '7.3'
  - '8.0'

env:
  global:
    - SYMFONY_VERSION="~5.0" ES_FILENAME_SUFFIX="-linux-x86_64"
  matrix:
    - ES_VERSION="7.2.1"
    - ES_VERSION="7.2.1" SYMFONY_VERSION="~4.4"
    - ES_VERSION="7.11.1"
    - ES_VERSION="7.11.1" SYMFONY_VERSION="~4.4"

install:
  - composer require --no-update symfony/framework-bundle:${SYMFONY_VERSION}
  - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}${ES_FILENAME_SUFFIX}.tar.gz
  - tar -xzf elasticsearch-${ES_VERSION}${ES_FILENAME_SUFFIX}.tar.gz
  - ./elasticsearch-${ES_VERSION}/bin/elasticsearch > /dev/null 2>&1 &
  - composer install --dev --no-interaction

before_script:
  - export XDEBUG_MODE=coverage

script:
  - vendor/bin/simple-phpunit --coverage-clover=Tests/App/build/clover.xml 2>/dev/null
  - vendor/bin/phpcs -np --standard=PSR2 --ignore=vendor/,Tests/App/,var/ ./

after_script:
  - travis_retry php vendor/bin/php-coveralls -v

Fix for running tests with php8
Fix for running tests with php8
