diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2645b4..593f3ac 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 @@ -42,7 +43,7 @@ jobs: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: 8.2 + php-version: 8.5 coverage: xdebug ini-file: development - run: composer install diff --git a/tests/DuplexResourceStreamTest.php b/tests/DuplexResourceStreamTest.php index c1076a6..d43ae73 100644 --- a/tests/DuplexResourceStreamTest.php +++ b/tests/DuplexResourceStreamTest.php @@ -33,7 +33,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically(): void $stream = new DuplexResourceStream($resource); $ref = new \ReflectionProperty($stream, 'loop'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $loop = $ref->getValue($stream); $this->assertInstanceOf('React\EventLoop\LoopInterface', $loop); diff --git a/tests/ReadableResourceStreamTest.php b/tests/ReadableResourceStreamTest.php index 3f7c144..520b1ea 100644 --- a/tests/ReadableResourceStreamTest.php +++ b/tests/ReadableResourceStreamTest.php @@ -32,7 +32,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically(): void $stream = new ReadableResourceStream($resource); $ref = new \ReflectionProperty($stream, 'loop'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $loop = $ref->getValue($stream); $this->assertInstanceOf('React\EventLoop\LoopInterface', $loop); diff --git a/tests/WritableResourceStreamTest.php b/tests/WritableResourceStreamTest.php index bc4fc42..91925f0 100644 --- a/tests/WritableResourceStreamTest.php +++ b/tests/WritableResourceStreamTest.php @@ -31,7 +31,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically(): void $stream = new WritableResourceStream($resource); $ref = new \ReflectionProperty($stream, 'loop'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $loop = $ref->getValue($stream); $this->assertInstanceOf('React\EventLoop\LoopInterface', $loop); @@ -509,6 +511,10 @@ public function testDoubleCloseWillEmitOnlyOnce(): void */ public function testWritingToClosedWritableResourceStreamShouldNotWriteToStream(): void { + if (PHP_VERSION_ID >= 80500) { + $this->markTestSkipped('Since PHP 8.5 attempting to write to a closed stream will result in an error'); + } + $stream = fopen('php://temp', 'r+'); assert(is_resource($stream));