language: php

php:
    - 5.6
    - 7.0

env:
  global:
      - DRIVER_VERSION="stable"
      - ADAPTER_VERSION="^1.0.0"

services: mongodb

before_install:
    - curl -sS https://getcomposer.org/installer | php

install:
    - if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then yes '' | pecl -q install -f mongo-${DRIVER_VERSION}; fi
    - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then pecl install -f mongodb-${DRIVER_VERSION}; fi
    - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
    - php composer.phar install

before_script:
    - mv Tests/config/parameters.yml.travis Tests/config/parameters.yml

script:
    - php vendor/bin/phpunit -v

language: php

php:
    - 5.6
    - 7.0
    - 7.1
    - 7.2

env:
  global:
      - DRIVER_VERSION="stable"
      - ADAPTER_VERSION="^1.0.0"

services: mongodb

before_install:
    - curl -sS https://getcomposer.org/installer | php

install:
    - if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then yes '' | pecl -q install -f mongo-${DRIVER_VERSION}; fi
    - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then pecl install -f mongodb-${DRIVER_VERSION}; fi
    - if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
    - php composer.phar install

before_script:
    - mv Tests/config/parameters.yml.travis Tests/config/parameters.yml

script:
    - php vendor/bin/phpunit -v

Add PHP 7.1 and 7.2 to the build matrix
Add PHP 7.1 and 7.2 to the build matrix
