Skip to content

Commit 3c2e525

Browse files
committed
Fix test error for old reactphp/async v3 on PHP 8.1+
1 parent f4bc80a commit 3c2e525

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/Io/ReactiveHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function testRunWillOnlyRestartLoopAfterAwaitingWhenFibersAreNotAvailable
186186
$promise = $connector->connect($addr);
187187

188188
// the loop will only need to be restarted if fibers are not available (PHP < 8.1)
189-
if (PHP_VERSION_ID < 80100) {
189+
if (!function_exists('React\Async\async')) {
190190
$logger->expects($this->once())->method('log')->with('Warning: Loop restarted. Upgrade to react/async v4 recommended for production use.');
191191
} else {
192192
$logger->expects($this->never())->method('log');

0 commit comments

Comments
 (0)