From 49169d07aa4e1b64beddcdfa8f2395e928ea4209 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 3 Oct 2020 22:46:14 +0545 Subject: [PATCH 1/2] Adjust boolean vars in .travis.yml to prepare for PHP8.0 --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d86cb8..a2cee21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ php: env: global: + - RUN_PHPCSFIXER="TRUE" + - RUN_PHPUNIT="TRUE" - RUN_PHPSTAN="FALSE" matrix: - PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml" @@ -17,16 +19,19 @@ matrix: - 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 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: From 9ad67d346c58c9899de353262365fd0b2e0993ee Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 3 Oct 2020 22:47:29 +0545 Subject: [PATCH 2/2] Run unit tests on PHP8 --- .travis.yml | 6 ++++++ composer.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a2cee21..8ed079c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,12 @@ env: matrix: include: + - name: 'PHP8' + dist: focal + php: nightly + env: + - RUN_PHPCSFIXER="FALSE" + - REPORT_COVERAGE="FALSE" - name: 'PHPStan' php: 7.4 env: diff --git a/composer.json b/composer.json index ff37ce4..a09d2b4 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "homepage": "http://sabre.io/dav/", "license": "BSD-3-Clause", "require": { - "php" : "^7.1", + "php" : "^7.1 || ^8.0", "sabre/xml" : "^2.0" }, "authors": [