Skip to content

Commit d127092

Browse files
committed
Forward compatibility with upcoming Promise v3
1 parent 8b2f18c commit d127092

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

composer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@
1212
],
1313
"require": {
1414
"php": ">=5.3",
15-
"react/promise": " ^2.1 || ^1.2.1",
16-
"react/socket": "^1.9",
15+
"react/promise": "^3@dev || ^2.1 || ^1.2.1",
16+
"react/socket": "dev-promise-3 as 1.12.0",
1717
"ringcentral/psr7": "^1.2"
1818
},
1919
"require-dev": {
20-
"clue/block-react": "^1.1",
20+
"clue/block-react": "^1.5",
2121
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8",
22-
"react/event-loop": "^1.2",
23-
"react/http": "^1.5"
22+
"react/event-loop": "^1.2"
2423
},
2524
"autoload": {
2625
"psr-4": { "Clue\\React\\HttpProxy\\": "src/" }
2726
},
2827
"autoload-dev": {
2928
"psr-4": { "Clue\\Tests\\React\\HttpProxy\\": "tests/" }
30-
}
29+
},
30+
"repositories": [
31+
{
32+
"type": "vcs",
33+
"url": "https://github.com/WyriHaximus-labs/socket"
34+
}
35+
]
3136
}

tests/ProxyConnectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function testCancelPromiseWillCancelPendingConnection()
137137

138138
$promise = $proxy->connect('google.com:80');
139139

140-
$this->assertInstanceOf('React\Promise\CancellablePromiseInterface', $promise);
140+
$this->assertInstanceOf('React\Promise\PromiseInterface', $promise);
141141

142142
$promise->cancel();
143143
}
@@ -475,7 +475,7 @@ public function testCancelPromiseWhileConnectionIsReadyWillCloseOpenConnectionAn
475475

476476
$deferred->resolve($stream);
477477

478-
$this->assertInstanceOf('React\Promise\CancellablePromiseInterface', $promise);
478+
$this->assertInstanceOf('React\Promise\PromiseInterface', $promise);
479479

480480
$promise->cancel();
481481

0 commit comments

Comments
 (0)