diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbc6bfb..e126a6d 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 @@ -47,7 +48,7 @@ jobs: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: 8.5 coverage: xdebug ini-file: development - run: composer install diff --git a/tests/DuplexResourceStreamTest.php b/tests/DuplexResourceStreamTest.php index cc72f69..0abc039 100644 --- a/tests/DuplexResourceStreamTest.php +++ b/tests/DuplexResourceStreamTest.php @@ -27,7 +27,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically() $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 8385ab8..9afc4d3 100644 --- a/tests/ReadableResourceStreamTest.php +++ b/tests/ReadableResourceStreamTest.php @@ -26,7 +26,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically() $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 35c90db..e09f6cb 100644 --- a/tests/WritableResourceStreamTest.php +++ b/tests/WritableResourceStreamTest.php @@ -26,7 +26,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically() $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); @@ -472,6 +474,10 @@ public function testDoubleCloseWillEmitOnlyOnce() */ public function testWritingToClosedWritableResourceStreamShouldNotWriteToStream() { + 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+'); $filterBuffer = ''; $loop = $this->createLoopMock();