.travis.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. language: php
  2. sudo: false
  3. cache:
  4. directories:
  5. - $HOME/.composer/cache/files
  6. - $HOME/symfony-bridge/.phpunit
  7. env:
  8. global:
  9. - PHPUNIT_FLAGS="-v"
  10. - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
  11. - DEPENDENCIES="zendframework/zend-diactoros:^1.4.1 http-interop/http-factory-diactoros:^1.0"
  12. matrix:
  13. fast_finish: true
  14. include:
  15. # Minimum supported dependencies with the latest and oldest PHP version
  16. - php: 7.2
  17. env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
  18. - php: 5.3
  19. dist: 'precise'
  20. env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" DEPENDENCIES=""
  21. # Test the latest stable release
  22. - php: 5.3
  23. dist: 'precise'
  24. env: DEPENDENCIES=""
  25. - php: 5.4
  26. env: DEPENDENCIES="zendframework/zend-diactoros:^1.4.1"
  27. - php: 5.5
  28. env: DEPENDENCIES="zendframework/zend-diactoros:^1.4.1"
  29. - php: 5.6
  30. env: DEPENDENCIES="zendframework/zend-diactoros:^1.4.1"
  31. - php: 7.0
  32. - php: 7.1
  33. - php: 7.2
  34. env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text"
  35. # Test LTS versions. This makes sure we do not use Symfony packages with version greater
  36. # than 2 or 3 respectively.
  37. - php: 7.2
  38. env: DEPENDENCIES="$DEPENDENCIES symfony/lts:^2 symfony/force-lowest:~2.8.0"
  39. - php: 7.2
  40. env: DEPENDENCIES="$DEPENDENCIES symfony/lts:^3 symfony/force-lowest:~3.4.0"
  41. # Latest commit to master
  42. - php: 7.2
  43. env: STABILITY="dev"
  44. allow_failures:
  45. # Dev-master is allowed to fail.
  46. - env: STABILITY="dev"
  47. before_install:
  48. - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
  49. - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
  50. - if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
  51. install:
  52. # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
  53. - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
  54. - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
  55. - ./vendor/bin/simple-phpunit install
  56. script:
  57. - composer validate --strict --no-check-lock
  58. # simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and
  59. # it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge)
  60. - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS