language: php

php:
  - 5.3
  - 5.4
  - 5.5

env:
  - SYMFONY_VERSION="2.1" GUZZLE_VERSION="3.1"
  - SYMFONY_VERSION="2.*" GUZZLE_VERSION="3.1"
  - SYMFONY_VERSION="2.1" GUZZLE_VERSION="3.*"
  - SYMFONY_VERSION="2.*" GUZZLE_VERSION="3.*"

before_script:
  - composer self-update
  - composer require symfony/http-foundation:${SYMFONY_VERSION} --no-update
  - composer require guzzle/http:${GUZZLE_VERSION} --no-update
  - composer install -n --dev --prefer-source

script:
  - mkdir -p build/logs
  - vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
  - vendor/bin/phpcs --standard=PSR2 src

after_script:
  - vendor/bin/coveralls -v
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
