Skip to content

Commit ba04c8c

Browse files
committed
Forward compatibility with react/promise 3
1 parent bf683a6 commit ba04c8c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
name: PHPUnit (PHP ${{ matrix.php }})
1010
runs-on: ubuntu-20.04
1111
strategy:
12+
fail-fast: false
1213
matrix:
1314
php:
1415
- 8.2

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
4242
"react/event-loop": "^1.2",
4343
"react/dns": "^1.7",
44-
"react/promise": "~2.1|~1.2"
44+
"react/promise": "^3 || ^2.1 || ^1.2"
4545
},
4646
"require-dev": {
4747
"clue/block-react": "~1.0",

src/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function ($_, $reject) use ($promise) {
140140
$reject(new \RuntimeException('Cancelled creating socket during DNS lookup'));
141141

142142
// (try to) cancel pending DNS lookup, otherwise ignoring its results
143-
if ($promise instanceof CancellablePromiseInterface) {
143+
if (method_exists($promise, 'cancel')) {
144144
$promise->cancel();
145145
}
146146
}

0 commit comments

Comments
 (0)