|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## 0.6.0 (2016-11-29) |
| 4 | + |
| 5 | +* Feature / BC break: Pass connector into `Client` instead of loop, remove unneeded deps |
| 6 | + (#49 by @clue) |
| 7 | + |
| 8 | + ```php |
| 9 | + // old (connector is create implicitly) |
| 10 | + $client = new Client('127.0.0.1', $loop); |
| 11 | + |
| 12 | + // old (connector can optionally be passed) |
| 13 | + $client = new Client('127.0.0.1', $loop, $connector); |
| 14 | + |
| 15 | + // new (connector is now mandatory) |
| 16 | + $connector = new React\SocketClient\TcpConnector($loop); |
| 17 | + $client = new Client('127.0.0.1', $connector); |
| 18 | + ``` |
| 19 | + |
| 20 | +* Feature / BC break: `Client` now implements `ConnectorInterface`, remove `Connector` adapter |
| 21 | + (#47 by @clue) |
| 22 | + |
| 23 | + ```php |
| 24 | + // old (explicit connector functions as an adapter) |
| 25 | + $connector = $client->createConnector(); |
| 26 | + $promise = $connector->create('google.com', 80); |
| 27 | + |
| 28 | + // new (client can be used as connector right away) |
| 29 | + $promise = $client->create('google.com', 80); |
| 30 | + ``` |
| 31 | + |
| 32 | +* Feature / BC break: Remove `createSecureConnector()`, use `SecureConnector` instead |
| 33 | + (#47 by @clue) |
| 34 | + |
| 35 | + ```php |
| 36 | + // old (tight coupling and hidden dependency) |
| 37 | + $tls = $client->createSecureConnector(); |
| 38 | + $promise = $tls->create('google.com', 443); |
| 39 | + |
| 40 | + // new (more explicit, loose coupling) |
| 41 | + $tls = new React\SocketClient\SecureConnector($client, $loop); |
| 42 | + $promise = $tls->create('google.com', 443); |
| 43 | + ``` |
| 44 | + |
| 45 | +* Feature / BC break: Remove `setResolveLocal()` and local DNS resolution and default to remote DNS resolution, use `DnsConnector` instead |
| 46 | + (#44 by @clue) |
| 47 | + |
| 48 | + ```php |
| 49 | + // old (implicitly defaults to true, can be disabled) |
| 50 | + $client->setResolveLocal(false); |
| 51 | + $tcp = $client->createConnector(); |
| 52 | + $promise = $tcp->create('google.com', 80); |
| 53 | + |
| 54 | + // new (always disabled, can be re-enabled like this) |
| 55 | + $factory = new React\Dns\Resolver\Factory(); |
| 56 | + $resolver = $factory->createCached('8.8.8.8', $loop); |
| 57 | + $tcp = new React\SocketClient\DnsConnector($client, $resolver); |
| 58 | + $promise = $tcp->create('google.com', 80); |
| 59 | + ``` |
| 60 | + |
| 61 | +* Feature / BC break: Remove `setTimeout()`, use `TimeoutConnector` instead |
| 62 | + (#45 by @clue) |
| 63 | + |
| 64 | + // old (timeout only applies to TCP/IP connection) |
| 65 | + $client = new Client('127.0.0.1', …); |
| 66 | + $client->setTimeout(3.0); |
| 67 | + $tcp = $client->createConnector(); |
| 68 | + $promise = $tcp->create('google.com', 80); |
| 69 | + |
| 70 | + // new (timeout can be added to any layer) |
| 71 | + $client = new Client('127.0.0.1', …); |
| 72 | + $tcp = new React\SocketClient\TimeoutConnector($client, 3.0, $loop); |
| 73 | + $promise = $tcp->create('google.com', 80); |
| 74 | + ``` |
| 75 | +
|
| 76 | +* Feature / BC break: Remove `setProtocolVersion()` and `setAuth()` mutators, only support SOCKS URI for protocol version and authentication (immutable API) |
| 77 | + (#46 by @clue) |
| 78 | +
|
| 79 | + ```php |
| 80 | + // old (state can be mutated after instantiation) |
| 81 | + $client = new Client('127.0.0.1', …); |
| 82 | + $client->setProtocolVersion('5'); |
| 83 | + $client->setAuth('user', 'pass'); |
| 84 | +
|
| 85 | + // new (immutable after construction, already supported as of v0.5.2 - now mandatory) |
| 86 | + $client = new Client('socks5://user:[email protected]', …); |
| 87 | + ``` |
| 88 | + |
3 | 89 | ## 0.5.2 (2016-11-25)
|
4 | 90 |
|
5 | 91 | * Feature: Apply protocol version and username/password auth from SOCKS URI
|
|
0 commit comments