Skip to content

Commit

Permalink
Forward compatibility with upcoming Promise v3
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Jun 21, 2022
1 parent 8b2f18c commit d127092
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,25 @@
],
"require": {
"php": ">=5.3",
"react/promise": " ^2.1 || ^1.2.1",
"react/socket": "^1.9",
"react/promise": "^3@dev || ^2.1 || ^1.2.1",
"react/socket": "dev-promise-3 as 1.12.0",
"ringcentral/psr7": "^1.2"
},
"require-dev": {
"clue/block-react": "^1.1",
"clue/block-react": "^1.5",
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8",
"react/event-loop": "^1.2",
"react/http": "^1.5"
"react/event-loop": "^1.2"
},
"autoload": {
"psr-4": { "Clue\\React\\HttpProxy\\": "src/" }
},
"autoload-dev": {
"psr-4": { "Clue\\Tests\\React\\HttpProxy\\": "tests/" }
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/WyriHaximus-labs/socket"
}
]
}
4 changes: 2 additions & 2 deletions tests/ProxyConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function testCancelPromiseWillCancelPendingConnection()

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

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

$promise->cancel();
}
Expand Down Expand Up @@ -475,7 +475,7 @@ public function testCancelPromiseWhileConnectionIsReadyWillCloseOpenConnectionAn

$deferred->resolve($stream);

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

$promise->cancel();

Expand Down

0 comments on commit d127092

Please sign in to comment.