sudo: required

language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3

env:
  - SIMPLESAMLPHP_VERSION=1.17.*
  
before_script:
  - composer require "simplesamlphp/simplesamlphp:${SIMPLESAMLPHP_VERSION}" --no-update
  - composer update --no-interaction

script:
  - vendor/simplesamlphp/simplesamlphp-test-framework/bin/check-syntax-php.sh
  - vendor/simplesamlphp/simplesamlphp-test-framework/bin/check-syntax-json.sh
  - if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then php vendor/phpunit/phpunit/phpunit; else php vendor/phpunit/phpunit/phpunit --no-coverage; fi
  - if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then vendor/bin/psalm; fi

after_success:
  - if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then bash <(curl -s https://codecov.io/bash); fi

sudo: required

language: php

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3

matrix:
  allow_failures:
    - php: 7.3

env:
  - SIMPLESAMLPHP_VERSION=1.17.*
  
before_script:
  - composer require "simplesamlphp/simplesamlphp:${SIMPLESAMLPHP_VERSION}" --no-update
  - composer update --no-interaction

script:
  - vendor/simplesamlphp/simplesamlphp-test-framework/bin/check-syntax-php.sh
  - vendor/simplesamlphp/simplesamlphp-test-framework/bin/check-syntax-json.sh
  - if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then php vendor/phpunit/phpunit/phpunit; else php vendor/phpunit/phpunit/phpunit --no-coverage; fi
  - if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then vendor/bin/psalm; fi

after_success:
  - if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then bash <(curl -s https://codecov.io/bash); fi

Allow Psalm to fail for now
Allow Psalm to fail for now