language: php

php: [5.3, 5.4, 5.5, 5.6, 7.0, hhvm]

sudo: false

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

branches:
  except:
    - /^bugfix\/.*$/
    - /^feature\/.*$/
    - /^optimization\/.*$/

matrix:
  fast_finish: true
  include:
    - php: '7.0'
      env: PHPDOCUMENTOR_REFLECTION_DOCBLOCK="^2.0"

before_script:
  - if [ -n "$PHPDOCUMENTOR_REFLECTION_DOCBLOCK" ]; then
      composer require "phpdocumentor/reflection-docblock:${PHPDOCUMENTOR_REFLECTION_DOCBLOCK}" --no-update;
    fi;
  - travis_retry composer update --no-interaction

script: vendor/bin/phpspec run -fpretty -v
