From dd0a819c65d3c68289e0f829b9c5cee74e5fc58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 25 Oct 2026 14:07:30 +0100 Subject: [PATCH] Run tests on PHP 8.5 and update test environment --- .github/workflows/ci.yml | 5 +++-- composer.json | 4 ++-- tests/UnwrapReadableTest.php | 4 +++- tests/UnwrapWritableTest.php | 8 ++++++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18bf628..bd7ad2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -26,7 +27,7 @@ jobs: - 5.4 - 5.3 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -43,7 +44,7 @@ jobs: runs-on: ubuntu-24.04 continue-on-error: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM - name: Run hhvm composer.phar install uses: docker://hhvm/hhvm:3.30-lts-latest diff --git a/composer.json b/composer.json index 3382bcd..fcb2f52 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,8 @@ ], "require": { "php": ">=5.3", - "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6", - "react/promise": "^3 || ^2.1 || ^1.2" + "react/stream": "^1.4", + "react/promise": "^3.3 || ^2.1 || ^1.2" }, "require-dev": { "phpunit/phpunit": "^9.6 || ^8.5 || ^5.7 || ^4.8.36" diff --git a/tests/UnwrapReadableTest.php b/tests/UnwrapReadableTest.php index 36c15c6..4e2a150 100644 --- a/tests/UnwrapReadableTest.php +++ b/tests/UnwrapReadableTest.php @@ -321,7 +321,9 @@ public function testCloseShouldRemoveReferenceToPromiseToAvoidGarbageReferences( $stream->close(); $ref = new \ReflectionProperty($stream, 'promise'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $value = $ref->getValue($stream); $this->assertNull($value); diff --git a/tests/UnwrapWritableTest.php b/tests/UnwrapWritableTest.php index 5ba47c4..98fa5c8 100644 --- a/tests/UnwrapWritableTest.php +++ b/tests/UnwrapWritableTest.php @@ -421,13 +421,17 @@ public function testCloseShouldRemoveReferenceToPromiseAndStreamToAvoidGarbageRe $stream->close(); $ref = new \ReflectionProperty($stream, 'promise'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $value = $ref->getValue($stream); $this->assertNull($value); $ref = new \ReflectionProperty($stream, 'stream'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $value = $ref->getValue($stream); $this->assertNull($value);