From 0ca06ea10373ab883e2d3f219c259aebccebcd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Wed, 27 Jul 2022 14:56:22 +0200 Subject: [PATCH 01/11] Update .gitattributes --- .gitattributes | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 580e017..9e4f327 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,9 @@ -/examples export-ignore -/tests export-ignore +/.github/ export-ignore +/examples/ export-ignore +/tests/ export-ignore /.gitattributes export-ignore /.gitignore export-ignore +/.php_cs.dist export-ignore /.travis.yml export-ignore /CHANGELOG.md export-ignore /README.md export-ignore From 20e8b0fd037d33a7d795fc324f3ffc50fae013ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Wed, 27 Jul 2022 15:03:22 +0200 Subject: [PATCH 02/11] Update .gitattributes --- .gitattributes | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9e4f327..3d68818 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,8 +4,7 @@ /.gitattributes export-ignore /.gitignore export-ignore /.php_cs.dist export-ignore -/.travis.yml export-ignore /CHANGELOG.md export-ignore /README.md export-ignore /_config.yml export-ignore -/phpunit.xml.dist export-ignore +/phpstan.neon export-ignore From fc383a6446f98f9b261b4abc8c0f473aa7e043dd Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 24 Aug 2022 16:20:26 +0545 Subject: [PATCH 03/11] Minor fixups noticed by my IDE --- examples/curl.php | 2 +- lib/Loop/Loop.php | 2 +- lib/Promise.php | 2 -- lib/coroutine.php | 2 -- tests/Event/CoroutineTest.php | 10 +++++----- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/examples/curl.php b/examples/curl.php index 90270ca..bfec865 100644 --- a/examples/curl.php +++ b/examples/curl.php @@ -102,7 +102,7 @@ function curl_multi_loop_scheduler($mh, callable $done) break; default: - throw Exception('Curl error: '.curl_multi_strerror($mrc)); + throw new Exception('Curl error: '.curl_multi_strerror($mrc)); } } diff --git a/lib/Loop/Loop.php b/lib/Loop/Loop.php index b85a7a4..8e82795 100644 --- a/lib/Loop/Loop.php +++ b/lib/Loop/Loop.php @@ -265,7 +265,7 @@ protected function runTimers() * If $timeout is 0, it will return immediately. If $timeout is null, it * will wait indefinitely. * - * @param float|null timeout + * @param float|null $timeout */ protected function runStreams($timeout) { diff --git a/lib/Promise.php b/lib/Promise.php index 42969a5..b582126 100644 --- a/lib/Promise.php +++ b/lib/Promise.php @@ -219,8 +219,6 @@ public function wait() * This method makes sure that the result of these callbacks are handled * correctly, and any chained promises are also correctly fulfilled or * rejected. - * - * @param callable $callBack */ private function invokeCallback(Promise $subPromise, callable $callBack = null) { diff --git a/lib/coroutine.php b/lib/coroutine.php index cdf2d3e..fa4cdf2 100644 --- a/lib/coroutine.php +++ b/lib/coroutine.php @@ -42,8 +42,6 @@ * * }); * - * @return \Sabre\Event\Promise - * * @psalm-template TReturn * @psalm-param callable():\Generator $gen * @psalm-return Promise diff --git a/tests/Event/CoroutineTest.php b/tests/Event/CoroutineTest.php index 689dc1c..54b6e02 100644 --- a/tests/Event/CoroutineTest.php +++ b/tests/Event/CoroutineTest.php @@ -56,7 +56,7 @@ public function testRejectedPromise() // This line is unreachable, but it's our control $start += 4; } catch (\Exception $e) { - $start += $e->getMessage(); + $start += (int) $e->getMessage(); } }); @@ -78,7 +78,7 @@ public function testRejectedPromiseException() // This line is unreachable, but it's our control $start += 4; } catch (\LogicException $e) { - $start += $e->getMessage(); + $start += (int) $e->getMessage(); } }); @@ -115,13 +115,13 @@ public function testRejectedPromiseAsync() // This line is unreachable, but it's our control $start += 4; } catch (\Exception $e) { - $start += $e->getMessage(); + $start += (int) $e->getMessage(); } }); $this->assertEquals(1, $start); - $promise->reject(new \Exception((string) 2)); + $promise->reject(new \Exception('2')); Loop\run(); $this->assertEquals(3, $start); @@ -156,7 +156,7 @@ public function testDeepException() $this->assertEquals(1, $start); - $promise->reject(new \Exception((string) 2)); + $promise->reject(new \Exception('2')); Loop\run(); $this->assertEquals(3, $start); From 83a46b5c1d9158175d0f9433d8a9300604f53437 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 24 Jul 2024 20:22:39 +0545 Subject: [PATCH 04/11] Add PHP 8.2 to CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3473cd2..5b3855b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1'] + php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] coverage: ['pcov'] code-analysis: ['no'] include: From b9e4059a4b79a3c38e30099cc4f810b701dd254e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 10 May 2023 20:35:26 +0545 Subject: [PATCH 05/11] Update deprecated GitHub workflow items --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b3855b..8e3eb86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: code-analysis: 'yes' steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php @@ -33,10 +33,10 @@ jobs: - name: Get composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache composer dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} # Use composer.json for key, if composer.lock is not committed. @@ -59,5 +59,5 @@ jobs: run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml - name: Code Coverage - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 if: matrix.coverage != 'none' From dc34b9000b223f35c3e85a2d6589b1103a9e515f Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 9 Nov 2023 10:37:35 +0545 Subject: [PATCH 06/11] Bump actions/checkout from 3 to 4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e3eb86..b93b397 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: code-analysis: 'yes' steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php From aba2c6586abb2cd395c2902dcc0f9745889320ed Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 24 Jul 2024 20:29:17 +0545 Subject: [PATCH 07/11] Add PHP 8.3 to CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b93b397..ae55690 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] coverage: ['pcov'] code-analysis: ['no'] include: From 4ef60c119f33bfd2da11f510a98ee9751e794f90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:33:31 +0000 Subject: [PATCH 08/11] Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae55690..e10e528 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} # Use composer.json for key, if composer.lock is not committed. From bde197db6e40ec1916909ed1936f8581362e29f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:26:20 +0000 Subject: [PATCH 09/11] Bump codecov/codecov-action from 3 to 4 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e10e528..3e72991 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,5 +59,5 @@ jobs: run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml - name: Code Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 if: matrix.coverage != 'none' From 1e336995ec25da5173f53650dda6c1eb7cb04d0a Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 10 May 2024 14:34:41 +0545 Subject: [PATCH 10/11] chore: remove unused bin directory --- bin/.empty | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bin/.empty diff --git a/bin/.empty b/bin/.empty deleted file mode 100644 index e69de29..0000000 From 241349636006bdf0b39623261ad8d266d39c22fc Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 24 Jul 2024 20:33:53 +0545 Subject: [PATCH 11/11] Bump phpunit dev dependency --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 42fb4aa..3c31181 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "~2.17.1", "phpstan/phpstan": "^0.12", - "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0" + "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.6" }, "scripts": { "phpstan": [