language: php
php:
  - 5.6
  - 7.0
sudo: false
services:
  - memcached
  - mysql
  - postgresql
env:
  global:
    - REPORT_EXIT_STATUS=1
  matrix:
    - DB=MySQLi
    - DB=SQLite
    - DB=PostgreSQL
matrix:
  allow_failures:
    - env: DB=PostgreSQL
before_script:
  - mysql -e 'CREATE DATABASE `travis`;'
  - psql -c 'CREATE DATABASE "travis";' -U postgres
  - if [[ "$(php -v | grep 'PHP 5')" ]]; then echo yes | pecl install apcu-4.0.11; fi
  - if [[ "$(php -v | grep 'PHP 7')" ]]; then echo yes | pecl install apcu-5.1.3; fi
  - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
script:
  - php -d variables_order=EGPCS test.php tests
after_success:
  - php -d variables_order=EGPCS -d phar.readonly=Off upload_build.php

language: php
php:
  - 5.6
  - 7.0
sudo: false
services:
  - memcached
  - mysql
  - postgresql
addons:
  postgresql: "9.4"
env:
  global:
    - REPORT_EXIT_STATUS=1
  matrix:
    - DB=MySQLi
    - DB=SQLite
    - DB=PostgreSQL
matrix:
  allow_failures:
    - env: DB=PostgreSQL
before_script:
  - mysql -e 'CREATE DATABASE `travis`;'
  - psql -c 'CREATE DATABASE "travis";' -U postgres
  - if [[ "$(php -v | grep 'PHP 5')" ]]; then echo yes | pecl install apcu-4.0.11; fi
  - if [[ "$(php -v | grep 'PHP 7')" ]]; then echo yes | pecl install apcu-5.1.3; fi
  - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
script:
  - php -d variables_order=EGPCS test.php tests
after_success:
  - php -d variables_order=EGPCS -d phar.readonly=Off upload_build.php

Use PostgreSQL 9.4 on Travis CI while 9.5 is not available
Use PostgreSQL 9.4 on Travis CI while 9.5 is not available
