Skip to content

Commit 2b82fd2

Browse files
committed
Use reactphp/async instead of clue/reactphp-block
1 parent eb3bd2c commit 2b82fd2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
1010
runs-on: ubuntu-20.04
11+
timeout-minutes: 5
1112
strategy:
1213
matrix:
1314
php:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"react/socket": "^1.12"
1717
},
1818
"require-dev": {
19-
"clue/block-react": "^1.5",
19+
"react/async": "^4 || ^3 || ^2",
2020
"clue/connection-manager-extra": "^1.3",
2121
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35",
2222
"react/event-loop": "^1.2",

tests/FunctionalTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
namespace Clue\Tests\React\Socks;
44

5-
use Clue\React\Block;
65
use Clue\React\Socks\Client;
76
use Clue\React\Socks\Server;
8-
use React\EventLoop\Loop;
97
use React\Socket\Connector;
108
use React\Socket\SecureConnector;
119
use React\Socket\SocketServer;
@@ -495,7 +493,7 @@ private function assertResolveStream($promise)
495493
$stream->close();
496494
});
497495

498-
Block\await($promise, Loop::get(), 2.0);
496+
\React\Async\await(\React\Promise\Timer\timeout($promise, 2.0));
499497
}
500498

501499
private function assertRejectPromise($promise, $message = null, $code = null)
@@ -514,6 +512,6 @@ private function assertRejectPromise($promise, $message = null, $code = null)
514512
$this->setExpectedException('Exception', $message, $code);
515513
}
516514

517-
Block\await($promise, Loop::get(), 2.0);
515+
\React\Async\await(\React\Promise\Timer\timeout($promise, 2.0));
518516
}
519517
}

0 commit comments

Comments
 (0)