This changeset updates the Connector signature to take the $context as first argument.
// unchanged
$connector = new React\Socket\Connector();
// deprecated
$connector = new React\Socket\Connector(null, $context);
$connector = new React\Socket\Connector($loop, $context);
// new
$connector = new React\Socket\Connector($context);
$connector = new React\Socket\Connector($context, $loop);
The new signature has been added to match the new SocketServer and consistently move the now commonly unneeded loop argument to the last argument. The previous signature has been deprecated and should not be used anymore. In its most basic form, both signatures are compatible. Existing code continues to work as-is.
This changeset updates the
Connector
signature to take the$context
as first argument.The new signature has been added to match the new
SocketServer
and consistently move the now commonly unneeded loop argument to the last argument. The previous signature has been deprecated and should not be used anymore. In its most basic form, both signatures are compatible. Existing code continues to work as-is.Builds on top of #263, https://github.com/reactphp/http/pull/417 and #260