Skip to content

Commit 9f218ab

Browse files
committed
[3.x] PHP8.5
1 parent f48623b commit 9f218ab

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ jobs:
99
name: PHPUnit (PHP ${{ matrix.php }})
1010
runs-on: ubuntu-24.04
1111
strategy:
12+
fail-fast: false
1213
matrix:
1314
php:
15+
- 8.5
1416
- 8.4
1517
- 8.3
1618
- 8.2
@@ -42,7 +44,7 @@ jobs:
4244
- uses: actions/checkout@v4
4345
- uses: shivammathur/setup-php@v2
4446
with:
45-
php-version: 8.2
47+
php-version: 8.5
4648
coverage: xdebug
4749
ini-file: development
4850
- run: composer install

tests/DuplexResourceStreamTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically(): void
3333
$stream = new DuplexResourceStream($resource);
3434

3535
$ref = new \ReflectionProperty($stream, 'loop');
36-
$ref->setAccessible(true);
36+
if (PHP_VERSION_ID < 80100) {
37+
$ref->setAccessible(true);
38+
}
3739
$loop = $ref->getValue($stream);
3840

3941
$this->assertInstanceOf('React\EventLoop\LoopInterface', $loop);

tests/ReadableResourceStreamTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically(): void
3232
$stream = new ReadableResourceStream($resource);
3333

3434
$ref = new \ReflectionProperty($stream, 'loop');
35-
$ref->setAccessible(true);
35+
if (PHP_VERSION_ID < 80100) {
36+
$ref->setAccessible(true);
37+
}
3638
$loop = $ref->getValue($stream);
3739

3840
$this->assertInstanceOf('React\EventLoop\LoopInterface', $loop);

tests/WritableResourceStreamTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically(): void
3131
$stream = new WritableResourceStream($resource);
3232

3333
$ref = new \ReflectionProperty($stream, 'loop');
34-
$ref->setAccessible(true);
34+
if (PHP_VERSION_ID < 80100) {
35+
$ref->setAccessible(true);
36+
}
3537
$loop = $ref->getValue($stream);
3638

3739
$this->assertInstanceOf('React\EventLoop\LoopInterface', $loop);
@@ -509,6 +511,10 @@ public function testDoubleCloseWillEmitOnlyOnce(): void
509511
*/
510512
public function testWritingToClosedWritableResourceStreamShouldNotWriteToStream(): void
511513
{
514+
if (PHP_VERSION_ID > 80499) {
515+
$this->markTestSkipped('Since PHP8.5 attempting to write to a closed stream will result in an error');
516+
}
517+
512518
$stream = fopen('php://temp', 'r+');
513519
assert(is_resource($stream));
514520

0 commit comments

Comments
 (0)