language: php
sudo: false

php:
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm
allow_failures:
  - php: hhvm
fast_finish: true

before_script:
  - /home/travis/build/facile-it/paraunit/.travis/sigsegv-extension/build-for-travis.sh
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; else PHPUNIT_FLAGS=""; fi
  - if [[ $TRAVIS_PHP_VERSION != '5.6' ]] && [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-rm xdebug.ini; fi
  - composer install --prefer-dist

script:
  - bin/phpunit -v $PHPUNIT_FLAGS

after_success:
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then php bin/coveralls -v; fi
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

language: php
sudo: false

php:
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm
allow_failures:
  - php: hhvm
fast_finish: true

before_script:
  - /home/travis/build/facile-it/paraunit/.travis/sigsegv-extension/build-for-travis.sh
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; else PHPUNIT_FLAGS=""; fi
  - if [[ $TRAVIS_PHP_VERSION != '5.6' ]] && [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-rm xdebug.ini; fi
  - COMPOSER_OPTIONS="--prefer-dist --prefer-stable"
  - if [[ $TRAVIS_PHP_VERSION = '5.3' ]]; then COMPOSER_OPTIONS+="--prefer-lowest"; fi
  - composer install --prefer-dist --prefer-stable $COMPOSER_OPTIONS

script:
  - bin/phpunit -v $PHPUNIT_FLAGS

after_success:
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then php bin/coveralls -v; fi
  - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

Add --prefer-lowest in Travis 5.3 build
Add --prefer-lowest in Travis 5.3 build
