language: php

php:
  - 5.5
  - 5.6

matrix:
  include:
    - php: 5.5
      env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'

sudo: false

cache:
  directories:
    - $HOME/.composer/cache

services: mongodb

before_install:
  - yes '' | pecl -q install -f mongo
  - php --ri mongo

install:
  - composer update $COMPOSER_FLAGS

language: php

php:
  - 5.5
  - 5.6

env:
  - MONGO_DRIVER=mongo

matrix:
  include:
    - php: 5.5
      env: MONGO_DRIVER=mongo COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
    - php: 7.0
      env: ADAPTER_VERSION="^1.0.0" MONGO_DRIVER=mongodb

sudo: false

cache:
  directories:
    - $HOME/.composer/cache

services: mongodb

before_install:
  - yes '' | pecl -q install -f $MONGO_DRIVER
  - if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi

install:
  - composer update $COMPOSER_FLAGS

Add PHP 7 to the build matrix
Add PHP 7 to the build matrix
