sudo: false

language: php

dist: trusty

php:
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2

before_script:
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then composer require satooshi/php-coveralls:1.* squizlabs/php_codesniffer:2.* -n ; fi
  - if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then composer require phpstan/phpstan:^0.10.3 -n ; fi
  - if [[ "$TRAVIS_PHP_VERSION" != '5.6' ]]; then composer install -n ; fi

script:
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi
  - if [[ "$TRAVIS_PHP_VERSION" != '5.6' ]]; then vendor/bin/phpunit ; fi
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then vendor/bin/phpcs ; fi
  - if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then vendor/bin/phpstan analyse Slim -l 1 ; fi

after_script:
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then php vendor/bin/coveralls --coverage_clover=clover.xml -v ; fi

notifications:
  slack: slimphp:0RNzx2JuhkAqIf0MXcUZ0asT

sudo: false

language: php

dist: trusty

php:
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2

before_script:
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then composer require satooshi/php-coveralls:1.* squizlabs/php_codesniffer:2.* -n ; fi
  - if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then composer require phpstan/phpstan:^0.10.3 -n ; fi
  - if [[ "$TRAVIS_PHP_VERSION" != '5.6' ]]; then composer install -n ; fi

script:
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi
  - if [[ "$TRAVIS_PHP_VERSION" != '5.6' ]]; then vendor/bin/phpunit ; fi
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then vendor/bin/phpcs ; fi
  - if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then vendor/bin/phpstan analyse Slim -l 1 || true ; fi

after_script:
  - if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then php vendor/bin/coveralls --coverage_clover=clover.xml -v ; fi

notifications:
  slack: slimphp:0RNzx2JuhkAqIf0MXcUZ0asT

Allow phpstan failure (for now)
Allow phpstan failure (for now)
