Releases: reactphp/socket
v1.17.0
v1.16.0
v1.15.0
v1.14.0
v1.13.0
-
Feature: Include timeout logic to avoid dependency on reactphp/promise-timer.
(#305 by @clue) -
Feature: Improve errno detection for failed connections without
ext-sockets.
(#304 by @clue) -
Improve test suite, clean up leftover
.sockfiles and report failed assertions.
(#299, #300, #301 and #306 by @clue)
v1.12.0
-
Feature: Forward compatibility with react/promise 3.
(#214 by @WyriHaximus and @clue) -
Feature: Full support for PHP 8.2 release.
(#298 by @WyriHaximus) -
Feature: Avoid unneeded syscall on socket close.
(#292 by @clue) -
Feature / Fix: Improve error reporting when custom error handler is used.
(#290 by @clue) -
Fix: Fix invalid references in exception stack trace.
(#284 by @clue) -
Minor documentation improvements, update to use new reactphp/async package instead of clue/reactphp-block.
(#296 by @clue, #285 by @SimonFrings and #295 by @nhedger) -
Improve test suite, update macOS and HHVM environment, fix optional tests for
ENETUNREACH.
(#288, #289 and #297 by @clue)
v1.11.0
v1.10.0
-
Feature: Support listening on existing file descriptors (FDs) with
SocketServer.
(#269 by @clue)$socket = new React\Socket\SocketSever('php://fd/3');
This is particularly useful when using systemd socket activation like this:
$ systemd-socket-activate -l 8000 php examples/03-http-server.php php://fd/3
-
Feature: Improve error messages for failed connection attempts with
errnoanderrstr.
(#265, #266, #267, #270 and #271 by @clue and #268 by @SimonFrings)All error messages now always include the appropriate
errnoanderrstrto
give more details about the error reason when available. Along with these
error details exposed by the underlying system functions, it will also
include the appropriate error constant name (such asECONNREFUSED) when
available. Accordingly, failed TCP/IP connections will now report the actual
underlying error condition instead of a generic "Connection refused" error.
Higher-level error messages will now consistently report the connection URI
scheme and hostname used in all error messages.For most common use cases this means that simply reporting the
Exception
message should give the most relevant details for any connection issues:$connector = new React\Socket\Connector(); $connector->connect($uri)->then(function (React\Socket\ConnectionInterface $conn) { // … }, function (Exception $e) { echo 'Error:' . $e->getMessage() . PHP_EOL; });
-
Improve test suite, test against PHP 8.1 release.
(#274 by @SimonFrings)
v1.9.0
-
Feature: Add new
SocketServerand deprecateServerto avoid class name collisions.
(#263 by @clue)The new
SocketServerclass has been added with an improved constructor signature
as a replacement for the previousServerclass in order to avoid any ambiguities.
The previous name has been deprecated and should not be used anymore.
In its most basic form, the deprecatedServercan now be considered an alias for newSocketServer.// 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);
-
Feature: Update
Connectorsignature to take optional$contextas first argument.
(#264 by @clue)The new signature has been added to match the new
SocketServerand
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.// 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);
v1.8.0
A major new feature release, see release announcement.
-
Feature: Simplify usage by supporting new default loop.
(#260 by @clue)// old (still supported) $socket = new React\Socket\Server('127.0.0.1:8080', $loop); $connector = new React\Socket\Connector($loop); // new (using default loop) $socket = new React\Socket\Server('127.0.0.1:8080'); $connector = new React\Socket\Connector();