Skip to content

Commit 528da19

Browse files
authored
Merge pull request #44 from clue-labs/php8.5
Run tests on PHP 8.5 and update test environment
2 parents 6ed741d + dd0a819 commit 528da19

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.5
1415
- 8.4
1516
- 8.3
1617
- 8.2
@@ -26,7 +27,7 @@ jobs:
2627
- 5.4
2728
- 5.3
2829
steps:
29-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v7
3031
- uses: shivammathur/setup-php@v2
3132
with:
3233
php-version: ${{ matrix.php }}
@@ -43,7 +44,7 @@ jobs:
4344
runs-on: ubuntu-24.04
4445
continue-on-error: true
4546
steps:
46-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v7
4748
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
4849
- name: Run hhvm composer.phar install
4950
uses: docker://hhvm/hhvm:3.30-lts-latest

‎composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
],
2929
"require": {
3030
"php": ">=5.3",
31-
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6",
32-
"react/promise": "^3 || ^2.1 || ^1.2"
31+
"react/stream": "^1.4",
32+
"react/promise": "^3.3 || ^2.1 || ^1.2"
3333
},
3434
"require-dev": {
3535
"phpunit/phpunit": "^9.6 || ^8.5 || ^5.7 || ^4.8.36"

‎tests/UnwrapReadableTest.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@ public function testCloseShouldRemoveReferenceToPromiseToAvoidGarbageReferences(
321321
$stream->close();
322322

323323
$ref = new \ReflectionProperty($stream, 'promise');
324-
$ref->setAccessible(true);
324+
if (PHP_VERSION_ID < 80100) {
325+
$ref->setAccessible(true);
326+
}
325327
$value = $ref->getValue($stream);
326328

327329
$this->assertNull($value);

‎tests/UnwrapWritableTest.php‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,17 @@ public function testCloseShouldRemoveReferenceToPromiseAndStreamToAvoidGarbageRe
421421
$stream->close();
422422

423423
$ref = new \ReflectionProperty($stream, 'promise');
424-
$ref->setAccessible(true);
424+
if (PHP_VERSION_ID < 80100) {
425+
$ref->setAccessible(true);
426+
}
425427
$value = $ref->getValue($stream);
426428

427429
$this->assertNull($value);
428430

429431
$ref = new \ReflectionProperty($stream, 'stream');
430-
$ref->setAccessible(true);
432+
if (PHP_VERSION_ID < 80100) {
433+
$ref->setAccessible(true);
434+
}
431435
$value = $ref->getValue($stream);
432436

433437
$this->assertNull($value);

0 commit comments

Comments
 (0)