From ed00044d129ed9e5ada9ce542fe2571bfe520637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 10:44:14 +1300 Subject: [PATCH 01/19] Drop hhvm from build matrix --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c126e32..2224a46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ php: - 7.2 - 7.3 - nightly - - hhvm branches: only: @@ -27,7 +26,7 @@ cache: - $HOME/.composer/cache before_install: - - if [[ "$TRAVIS_PHP_VERSION" != "5.6" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini || true; fi + - if [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then phpenv config-rm xdebug.ini || true; fi - composer selfupdate install: composer update --prefer-dist --no-interaction From 91a348d6bde168ae9725c653193ae2e89aeecc60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 10:52:33 +1300 Subject: [PATCH 02/19] Bump minimal PHP version to 7.1 --- .travis.yml | 12 +++--------- composer.json | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2224a46..255142c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,6 @@ dist: trusty language: php php: - - 5.5 - - 5.6 - - 7.0 - 7.1 - 7.2 - 7.3 @@ -26,14 +23,11 @@ cache: - $HOME/.composer/cache before_install: - - if [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then phpenv config-rm xdebug.ini || true; fi + - phpenv config-rm xdebug.ini || true - composer selfupdate install: composer update --prefer-dist --no-interaction script: - - if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then bin/phpunit --debug --coverage-clover build/logs/clover.xml; else bin/phpunit --debug; fi - - if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then composer require "friendsofphp/php-cs-fixer:^2.0" && bin/php-cs-fixer fix --diff --dry-run -v; fi; - -after_success: - - if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then composer require "satooshi/php-coveralls:^1.0" && travis_retry php bin/coveralls -v; fi + - bin/phpunit --debug + - composer require "friendsofphp/php-cs-fixer:^2.0" && bin/php-cs-fixer fix --diff --dry-run -v diff --git a/composer.json b/composer.json index d90b0ca..e000e00 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "overblog/promise-adapter": "self.version" }, "require": { - "php": "^5.5|^7.0" + "php": "^7.1" }, "require-dev": { "guzzlehttp/promises": "^1.3.0", From 85b9d5859801d03074fb1e2ed03543b70add7cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 11:04:00 +1300 Subject: [PATCH 03/19] Remove PHP 7.3 from allowed failures --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 255142c..59e64d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ branches: matrix: allow_failures: - php: nightly - - php: 7.3 cache: directories: From 158b036ef9af5e27fd1c2e07b4783c1042851f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 11:04:32 +1300 Subject: [PATCH 04/19] Add PHP 7.4 to build matrix --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 59e64d4..e5a2462 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4 - nightly branches: From 1817de3426d097107f653865f13b4aa06872f190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 11:08:57 +1300 Subject: [PATCH 05/19] Check platform requirements --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e5a2462..940b359 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,5 +29,6 @@ before_install: install: composer update --prefer-dist --no-interaction script: + - composer check-platform-reqs - bin/phpunit --debug - composer require "friendsofphp/php-cs-fixer:^2.0" && bin/php-cs-fixer fix --diff --dry-run -v From 18b3b7b16f1da8fed3c71492ee4fcfa0ad84d717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 12:30:00 +1300 Subject: [PATCH 06/19] Replace `\PHPUnit_Framework_TestCase` with `\PHPUnit\Framework\TestCase` --- composer.json | 2 +- lib/promise-adapter/tests/AdapterTest.php | 2 +- tests/Functional/Webonyx/GraphQL/TestCase.php | 2 +- tests/TestCase.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index e000e00..daa2718 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require-dev": { "guzzlehttp/promises": "^1.3.0", - "phpunit/phpunit": "^4.1|^5.1", + "phpunit/phpunit": "^5.7", "react/promise": "^2.5.0", "webonyx/graphql-php": "^0.11.0" }, diff --git a/lib/promise-adapter/tests/AdapterTest.php b/lib/promise-adapter/tests/AdapterTest.php index a51e9e1..6b40ea2 100644 --- a/lib/promise-adapter/tests/AdapterTest.php +++ b/lib/promise-adapter/tests/AdapterTest.php @@ -16,7 +16,7 @@ use Overblog\PromiseAdapter\Adapter\WebonyxGraphQLSyncPromiseAdapter; use Overblog\PromiseAdapter\PromiseAdapterInterface; -class AdapterTest extends \PHPUnit_Framework_TestCase +class AdapterTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider AdapterDataProvider diff --git a/tests/Functional/Webonyx/GraphQL/TestCase.php b/tests/Functional/Webonyx/GraphQL/TestCase.php index 1cc7ec1..e5298c7 100644 --- a/tests/Functional/Webonyx/GraphQL/TestCase.php +++ b/tests/Functional/Webonyx/GraphQL/TestCase.php @@ -18,7 +18,7 @@ use Overblog\DataLoader\DataLoader; use Overblog\PromiseAdapter\PromiseAdapterInterface; -abstract class TestCase extends \PHPUnit_Framework_TestCase +abstract class TestCase extends \PHPUnit\Framework\TestCase { private static $fixtures = null; diff --git a/tests/TestCase.php b/tests/TestCase.php index 2359a79..a5776b0 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -14,7 +14,7 @@ use Overblog\PromiseAdapter\Adapter\ReactPromiseAdapter; use Overblog\PromiseAdapter\PromiseAdapterInterface; -abstract class TestCase extends \PHPUnit_Framework_TestCase +abstract class TestCase extends \PHPUnit\Framework\TestCase { /** * @var PromiseAdapterInterface From 6664b35ccf0649c8f7545ed6ac346ce45d9b2266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 12:50:47 +1300 Subject: [PATCH 07/19] Bump PHPUnit to version 7.5 --- composer.json | 2 +- phpunit.xml.dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index daa2718..8366a91 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require-dev": { "guzzlehttp/promises": "^1.3.0", - "phpunit/phpunit": "^5.7", + "phpunit/phpunit": "^7.5", "react/promise": "^2.5.0", "webonyx/graphql-php": "^0.11.0" }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 14c5b99..c498a7d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@ Date: Sun, 6 Dec 2020 11:53:22 +1300 Subject: [PATCH 08/19] Bump `webonyx/graphql-php` to version 0.13 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8366a91..8407b8f 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "guzzlehttp/promises": "^1.3.0", "phpunit/phpunit": "^7.5", "react/promise": "^2.5.0", - "webonyx/graphql-php": "^0.11.0" + "webonyx/graphql-php": "^0.13" }, "suggest": { "guzzlehttp/promises": "To use with Guzzle promise", From a14d40c030bd4775edc12684272d1a74bcb71705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 11:27:44 +1300 Subject: [PATCH 09/19] Prefer package sources on `composer update` `tests/StarWarsData.php` is no longer part of `webonyx/graphql-php` package --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 940b359..7ca8fe0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_install: - phpenv config-rm xdebug.ini || true - composer selfupdate -install: composer update --prefer-dist --no-interaction +install: composer update --prefer-source --no-interaction script: - composer check-platform-reqs From bb2ebac3958d7b6d56685893b7fc08bc20eb37dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 12:01:44 +1300 Subject: [PATCH 10/19] Fix deprecation for `GraphQL\Schema` --- tests/Functional/Webonyx/GraphQL/Schema.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Functional/Webonyx/GraphQL/Schema.php b/tests/Functional/Webonyx/GraphQL/Schema.php index 7219a54..f37d339 100644 --- a/tests/Functional/Webonyx/GraphQL/Schema.php +++ b/tests/Functional/Webonyx/GraphQL/Schema.php @@ -81,6 +81,6 @@ public static function build(DataLoader $dataLoader) ] ]); - return new \GraphQL\Schema(['query' => $queryType]); + return new \GraphQL\Type\Schema(['query' => $queryType]); } } From 992cf5decac2f0c7e08489f494ad0532ad426737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 12:59:11 +1300 Subject: [PATCH 11/19] Suppress deprecation errors in tests --- phpunit.xml.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c498a7d..7846ca1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -6,6 +6,7 @@ backupGlobals="false" colors="true" bootstrap="./vendor/autoload.php" + convertDeprecationsToExceptions="false" > From d82f54a8b03e66884211ce98a4d1e6d33417caff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 13:05:27 +1300 Subject: [PATCH 12/19] Bump `webonyx/graphql-php` to version 14 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8407b8f..7d82711 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "guzzlehttp/promises": "^1.3.0", "phpunit/phpunit": "^7.5", "react/promise": "^2.5.0", - "webonyx/graphql-php": "^0.13" + "webonyx/graphql-php": "^14.0" }, "suggest": { "guzzlehttp/promises": "To use with Guzzle promise", From 17caad58ddcd1005a8b0f08cd69ad71d4faea469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 13:13:58 +1300 Subject: [PATCH 13/19] Bump PHPUnit to version 8.5 --- composer.json | 2 +- tests/TestCase.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7d82711..07be0f0 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require-dev": { "guzzlehttp/promises": "^1.3.0", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.5", "react/promise": "^2.5.0", "webonyx/graphql-php": "^14.0" }, diff --git a/tests/TestCase.php b/tests/TestCase.php index a5776b0..755ef26 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -21,7 +21,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase */ protected static $promiseAdapter; - public function setUp() + public function setUp(): void { self::$promiseAdapter = new ReactPromiseAdapter(); } From 7d1c27cfcfc4df85a30f2af46f22d8d69c1fdadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 13:34:32 +1300 Subject: [PATCH 14/19] Allow PHPUnit 7 for compatibility with PHP 7.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 07be0f0..c3fd7c0 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require-dev": { "guzzlehttp/promises": "^1.3.0", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^7.5|^8.5", "react/promise": "^2.5.0", "webonyx/graphql-php": "^14.0" }, From 62b933b94c2707b87973e8ef9919fcd4fb699e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 13:41:13 +1300 Subject: [PATCH 15/19] Allow PHP 8 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c3fd7c0..70bbe0a 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "overblog/promise-adapter": "self.version" }, "require": { - "php": "^7.1" + "php": "^7.1|^8.0" }, "require-dev": { "guzzlehttp/promises": "^1.3.0", From 31c02ea89465d417a66a4391c1e09f8611ddc2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Sun, 6 Dec 2020 13:53:22 +1300 Subject: [PATCH 16/19] Use current version of `php-cs-fixer` --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7ca8fe0..3628e37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,4 +31,4 @@ install: composer update --prefer-source --no-interaction script: - composer check-platform-reqs - bin/phpunit --debug - - composer require "friendsofphp/php-cs-fixer:^2.0" && bin/php-cs-fixer fix --diff --dry-run -v + - composer require "friendsofphp/php-cs-fixer:^2.16" && bin/php-cs-fixer fix --diff --dry-run -v From 9b177b0a68ed5a4c05a754feba7c20ed584efbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Mon, 7 Dec 2020 09:08:47 +1300 Subject: [PATCH 17/19] Switch Travis CI from `trusty` to `bionic` --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3628e37..acda288 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: bionic language: php From 525026a0cbeeb7d3ec7c4739d6078855e472382f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Mon, 7 Dec 2020 09:09:33 +1300 Subject: [PATCH 18/19] Add PHP 8.0 to the build matrix --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index acda288..123792a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ php: - 7.2 - 7.3 - 7.4 + - 8.0 - nightly branches: From 828f405d6fde0f1af6b3d5f6b759bfdd3b2a3953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=C5=A1ek=20Henzl?= Date: Mon, 7 Dec 2020 08:57:01 +1300 Subject: [PATCH 19/19] Don't run `php-cs-fixer` for PHP 8.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 123792a..43fd842 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,4 +32,4 @@ install: composer update --prefer-source --no-interaction script: - composer check-platform-reqs - bin/phpunit --debug - - composer require "friendsofphp/php-cs-fixer:^2.16" && bin/php-cs-fixer fix --diff --dry-run -v + - if [ "$TRAVIS_PHP_VERSION" != "8.0" ]; then composer require "friendsofphp/php-cs-fixer:^2.16" && bin/php-cs-fixer fix --diff --dry-run -v; fi