From 85282771a5256d31b8cc2719b86fd651e23e7d47 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Mon, 17 Aug 2020 13:26:26 +0200 Subject: [PATCH] Update PHPUnit configuration schema for PHPUnit 9.3 --- .gitattributes | 1 + .gitignore | 1 - .travis.yml | 3 ++- composer.json | 2 +- phpunit.xml.dist | 22 +++++++++++++--------- phpunit.xml.legacy | 21 +++++++++++++++++++++ tests/TestCase.php | 1 - 7 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 phpunit.xml.legacy diff --git a/.gitattributes b/.gitattributes index 982c460d..e9da46b9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,4 +2,5 @@ /.gitignore export-ignore /.travis.yml export-ignore /phpunit.xml.dist export-ignore +/phpunit.xml.legacy export-ignore /tests export-ignore diff --git a/.gitignore b/.gitignore index 5241c60a..ff40baa3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ composer.lock composer.phar -phpunit.xml build/ vendor/ diff --git a/.travis.yml b/.travis.yml index d500b9d6..30eabd4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,8 @@ install: - composer install script: - - ./vendor/bin/phpunit -v --coverage-text --coverage-clover=./build/logs/clover.xml + - if [[ "$TRAVIS_PHP_VERSION" > "7.2" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=./build/logs/clover.xml; fi + - if [[ "$TRAVIS_PHP_VERSION" < "7.3" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=./build/logs/clover.xml -c phpunit.xml.legacy; fi after_script: - if [ -f ./build/logs/clover.xml ]; then travis_retry composer require php-coveralls/php-coveralls --no-interaction --update-with-dependencies; fi diff --git a/composer.json b/composer.json index 76e286aa..23a299b4 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "^9.0 || ^7.5" + "phpunit/phpunit": "^9.3 || ^7.5" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0b97c746..5c44c780 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,18 +1,22 @@ - + + ./tests/ - - - + + ./src/ - - ./src/functions_include.php - - - + + + ./src/functions_include.php + + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy new file mode 100644 index 00000000..a2a791a8 --- /dev/null +++ b/phpunit.xml.legacy @@ -0,0 +1,21 @@ + + + + + + + ./tests/ + + + + + ./src/ + + ./src/functions_include.php + + + + diff --git a/tests/TestCase.php b/tests/TestCase.php index 8983571c..5cd4c35c 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -3,7 +3,6 @@ namespace React\Promise; use PHPUnit\Framework\TestCase as BaseTestCase; -use React\Promise\Stub\CallableStub; class TestCase extends BaseTestCase {