|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## 1.9.0 (2021-08-03) |
| 4 | + |
| 5 | +* Feature: Add new `SocketServer` and deprecate `Server` to avoid class name collisions. |
| 6 | + (#263 by @clue) |
| 7 | + |
| 8 | + The new `SocketServer` class has been added with an improved constructor signature |
| 9 | + as a replacement for the previous `Server` class in order to avoid any ambiguities. |
| 10 | + The previous name has been deprecated and should not be used anymore. |
| 11 | + In its most basic form, the deprecated `Server` can now be considered an alias for new `SocketServer`. |
| 12 | + |
| 13 | + ```php |
| 14 | + // deprecated |
| 15 | + $socket = new React\Socket\Server(0); |
| 16 | + $socket = new React\Socket\Server('127.0.0.1:8000'); |
| 17 | + $socket = new React\Socket\Server('127.0.0.1:8000', null, $context); |
| 18 | + $socket = new React\Socket\Server('127.0.0.1:8000', $loop, $context); |
| 19 | + |
| 20 | + // new |
| 21 | + $socket = new React\Socket\SocketServer('127.0.0.1:0'); |
| 22 | + $socket = new React\Socket\SocketServer('127.0.0.1:8000'); |
| 23 | + $socket = new React\Socket\SocketServer('127.0.0.1:8000', $context); |
| 24 | + $socket = new React\Socket\SocketServer('127.0.0.1:8000', $context, $loop); |
| 25 | + ``` |
| 26 | + |
| 27 | +* Feature: Update `Connector` signature to take optional `$context` as first argument. |
| 28 | + (#264 by @clue) |
| 29 | + |
| 30 | + The new signature has been added to match the new `SocketServer` and |
| 31 | + consistently move the now commonly unneeded loop argument to the last argument. |
| 32 | + The previous signature has been deprecated and should not be used anymore. |
| 33 | + In its most basic form, both signatures are compatible. |
| 34 | + |
| 35 | + ```php |
| 36 | + // deprecated |
| 37 | + $connector = new React\Socket\Connector(null, $context); |
| 38 | + $connector = new React\Socket\Connector($loop, $context); |
| 39 | + |
| 40 | + // new |
| 41 | + $connector = new React\Socket\Connector($context); |
| 42 | + $connector = new React\Socket\Connector($context, $loop); |
| 43 | + ``` |
| 44 | + |
3 | 45 | ## 1.8.0 (2021-07-11)
|
4 | 46 |
|
5 | 47 | A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop).
|
|
0 commit comments