From b4cc48173901e1acda2771b132beb21ef61cd2eb Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 3 Oct 2020 14:54:41 +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 1aa3e0b..3fb649b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,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" @@ -18,16 +20,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 5fbdc1670f85164a792ca275b33bfcd6aff4a598 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 3 Oct 2020 14:58:47 +0545 Subject: [PATCH 2/2] Run unit tests on PHP8 --- .travis.yml | 20 +++++++++++++------- composer.json | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fb649b..2ddaa32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,13 +17,19 @@ env: matrix: include: - - name: 'PHPStan' - php: 7.4 - env: - - RUN_PHPCSFIXER="FALSE" - - RUN_PHPUNIT="FALSE" - - RUN_PHPSTAN="TRUE" - - REPORT_COVERAGE="FALSE" + - 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: diff --git a/composer.json b/composer.json index dca5df2..181afe1 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "homepage": "http://sabre.io/event/", "license": "BSD-3-Clause", "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "authors": [ {