镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
strategy:
matrix:
php:
- 8.5
- 8.4
- 8.3
- 8.2
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/DuplexResourceStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion tests/ReadableResourceStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 7 additions & 1 deletion tests/WritableResourceStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));

Expand Down