This changeset adds a new SocketServer class as a replacement for the Server class to avoid class name collisions and ambiguities.
// deprecated
$socket = new React\Socket\Server(0);
$socket = new React\Socket\Server('127.0.0.1:8000');
$socket = new React\Socket\Server('127.0.0.1:8000', null, $context);
$socket = new React\Socket\Server('127.0.0.1:8000', $loop, $context);
// new
$socket = new React\Socket\SocketServer('127.0.0.1:0');
$socket = new React\Socket\SocketServer('127.0.0.1:8000');
$socket = new React\Socket\SocketServer('127.0.0.1:8000', $context);
$socket = new React\Socket\SocketServer('127.0.0.1:8000', $context, $loop);
The new SocketServer class has been added with an improved constructor signature as a replacement for the previous Server class in order to avoid any ambiguities. The previous name has been deprecated and should not be used anymore. In its most basic form, the deprecated Server can now be considered an alias for new SocketServer. Existing code continues to work as-is.
This changeset adds a new
SocketServer
class as a replacement for theServer
class to avoid class name collisions and ambiguities.The new
SocketServer
class has been added with an improved constructor signature as a replacement for the previousServer
class in order to avoid any ambiguities. The previous name has been deprecated and should not be used anymore. In its most basic form, the deprecatedServer
can now be considered an alias for newSocketServer
. Existing code continues to work as-is.Builds on top of https://github.com/reactphp/http/pull/417 and #260