Skip to content

Commit 7bc10a6

Browse files
committed
Update SocketClient to v0.6
1 parent d70adc7 commit 7bc10a6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"require": {
77
"php": ">=5.4.0",
88
"guzzlehttp/psr7": "^1.0",
9-
"react/socket-client": "^0.5 || ^0.4 || ^0.3",
9+
"react/socket-client": "^0.6",
1010
"react/dns": "0.4.*",
1111
"react/event-loop": "0.4.*",
1212
"react/stream": "0.4.*",

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ protected function connect()
231231
$port = $this->requestData->getPort();
232232

233233
return $this->connector
234-
->create($host, $port);
234+
->connect($host . ':' . $port);
235235
}
236236

237237
public function setResponseFactory($factory)

tests/RequestTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ private function successfulAsyncConnectionMock()
480480

481481
$this->connector
482482
->expects($this->once())
483-
->method('create')
484-
->with('www.example.com', 80)
483+
->method('connect')
484+
->with('www.example.com:80')
485485
->will($this->returnValue($deferred->promise()));
486486

487487
return function () use ($deferred) {
@@ -493,8 +493,8 @@ private function rejectedConnectionMock()
493493
{
494494
$this->connector
495495
->expects($this->once())
496-
->method('create')
497-
->with('www.example.com', 80)
496+
->method('connect')
497+
->with('www.example.com:80')
498498
->will($this->returnValue(new RejectedPromise(new \RuntimeException())));
499499
}
500500

0 commit comments

Comments
 (0)