language: php

php:
  - 5.6
  - 7.0
  - 7.1

env:
  - DB=MYSQL CORE_RELEASE=4.1

matrix:
  include:
    - php: 7.1
      env: DB=PGSQL CORE_RELEASE=4.1
    - php: 7.1
      env: DB=SQLITE3 CORE_RELEASE=4.1
    - php: 5.6
      env: DB=MYSQL CORE_RELEASE=4.0

before_script:
  # Init PHP
  - composer self-update || true
  - phpenv rehash
  - phpenv config-rm xdebug.ini

  # Install composer dependencies
  - composer validate
  - composer require --no-update silverstripe/recipe-core:^1.0
  - composer require --no-update phpunit/phpunit:^5.7
  - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist --no-update; fi
  - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.1.x-dev --prefer-dist --no-update; fi
  - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
  - vendor/bin/phpunit

language: php

php:
  - 5.6
  - 7.0
  - 7.1

env:
  - DB=MYSQL CORE_RELEASE=4.3

matrix:
  include:
    - php: 7.1
      env: DB=PGSQL CORE_RELEASE=4.3
    - php: 7.1
      env: DB=SQLITE3 CORE_RELEASE=4.3
    - php: 5.6
      env: DB=MYSQL CORE_RELEASE=4.2

before_script:
  # Init PHP
  - composer self-update || true
  - phpenv rehash
  - phpenv config-rm xdebug.ini

  # Install composer dependencies
  - composer validate
  - composer require --no-update silverstripe/recipe-core:^1.0
  - composer require --no-update phpunit/phpunit:^5.7
  - if [[ $CORE_RELEASE == 4.2 ]]; composer require --no-update silverstripe/versioned ^1.2; fi
  - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist --no-update; fi
  - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.1.x-dev --prefer-dist --no-update; fi
  - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
  - vendor/bin/phpunit

Adjust Travis to use 4.3 and 4.2
Adjust Travis to use 4.3 and 4.2
