Skip to content

Commit f99e9e4

Browse files
committed
Replace deprecated SocketClient with new Socket component
1 parent 74190c4 commit f99e9e4

7 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ $factory = new Factory($loop);
9191
```
9292

9393
If you need custom DNS or proxy settings, you can explicitly pass a
94-
custom instance of the [`ConnectorInterface`](https://github.com/reactphp/socket-client#connectorinterface):
94+
custom instance of the [`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface):
9595

9696
```php
9797
$factory = new Factory($loop, $connector);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"php": ">=5.3",
1515
"evenement/evenement": "~1.0|~2.0",
1616
"react/promise": "~1.0|~2.0",
17-
"react/socket-client": "^0.7",
17+
"react/socket": "^0.7",
1818
"react/event-loop": "0.3.*|0.4.*"
1919
},
2020
"require-dev": {

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Clue\React\Ami\Protocol\UnexpectedMessageException;
1111
use Evenement\EventEmitter;
1212
use React\Promise\Deferred;
13-
use React\SocketClient\ConnectionInterface;
13+
use React\Socket\ConnectionInterface;
1414
use Exception;
1515
use UnexpectedValueException;
1616

src/Factory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace Clue\React\Ami;
44

55
use React\EventLoop\LoopInterface;
6-
use React\SocketClient\ConnectionInterface;
7-
use React\SocketClient\Connector;
8-
use React\SocketClient\ConnectorInterface;
6+
use React\Socket\ConnectionInterface;
7+
use React\Socket\Connector;
8+
use React\Socket\ConnectorInterface;
99
use InvalidArgumentException;
1010

1111
class Factory

tests/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ public function testUnexpectedResponseEmitsErrorAndClosesClient()
4545

4646
private function createStreamMock()
4747
{
48-
return $this->getMockBuilder('React\SocketClient\StreamConnection')->disableOriginalConstructor()->setMethods(array('write', 'close'))->getMock();
48+
return $this->getMockBuilder('React\Socket\Connection')->disableOriginalConstructor()->setMethods(array('write', 'close'))->getMock();
4949
}
5050
}

tests/CollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testCollectingSIPEvents()
5151

5252
private function createClientMock()
5353
{
54-
$stream = $this->getMockBuilder('React\SocketClient\StreamConnection')->disableOriginalConstructor()->getMock();
54+
$stream = $this->getMockBuilder('React\Socket\Connection')->disableOriginalConstructor()->getMock();
5555

5656
$client = $this->getMockBuilder('Clue\React\Ami\Client')->setMethods(array('createAction'))->setConstructorArgs(array($stream))->getMock();
5757

tests/FactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class FactoryTest extends TestCase
1111
public function setUp()
1212
{
1313
$this->loop = $this->getMockBuilder('React\EventLoop\LoopInterface')->getMock();
14-
$this->tcp = $this->getMockBuilder('React\SocketClient\ConnectorInterface')->getMock();
14+
$this->tcp = $this->getMockBuilder('React\Socket\ConnectorInterface')->getMock();
1515

1616
$this->factory = new Factory($this->loop, $this->tcp);
1717
}

0 commit comments

Comments
 (0)