Skip to content

Commit

Permalink
Merge pull request #57 from phil-davis/test-with-php-8.0
Browse files Browse the repository at this point in the history
Test with PHP8.0
  • Loading branch information
phil-davis committed Oct 3, 2020
2 parents febedfb + a644bcf commit d01bb46
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,38 @@ php:

env:
global:
- RUN_PHPCSFIXER="TRUE"
- RUN_PHPUNIT="TRUE"
- RUN_PHPSTAN="FALSE"
matrix:
- PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
- PREFER_LOWEST="--prefer-lowest" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""

matrix:
include:
- name: 'PHP8'
dist: focal
php: nightly
env:
- RUN_PHPCSFIXER="FALSE"
- REPORT_COVERAGE="FALSE"
- name: 'PHPStan'
php: 7.4
env:
- RUN_PHPCSFIXER="FALSE"
- RUN_PHPUNIT="FALSE"
- RUN_PHPSTAN="TRUE"
- REPORT_COVERAGE="FALSE"
fast_finish: true

before_script:
- if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --dev friendsofphp/php-cs-fixer; fi
- composer update $PREFER_LOWEST
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini

script:
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
- if [ $RUN_PHPCSFIXER == "TRUE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
- if [ $RUN_PHPUNIT == "TRUE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi

after_success:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"homepage": "http://sabre.io/uri/",
"license": "BSD-3-Clause",
"require": {
"php": "^7.1"
"php": "^7.1 || ^8.0"
},
"authors": [
{
Expand Down

0 comments on commit d01bb46

Please sign in to comment.