Skip to content

Releases: reactphp/socket

v1.16.0

26 Jul 10:39
Compare
Choose a tag to compare
  • Feature: Improve PHP 8.4+ support by avoiding implicitly nullable type declarations.
    (#318 by @clue)

v1.15.0

15 Dec 11:05
Compare
Choose a tag to compare
  • Feature: Full PHP 8.3 compatibility.
    (#310 by @clue)

  • Fix: Fix cancelling during the 50ms resolution delay when DNS is still pending.
    (#311 by @clue)

v1.14.0

25 Aug 13:49
Compare
Choose a tag to compare
  • Feature: Improve Promise v3 support and use template types.
    (#307 and #309 by @clue)

  • Improve test suite and update to collect all garbage cycles.
    (#308 by @clue)

v1.13.0

07 Jun 10:34
Compare
Choose a tag to compare
  • 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 .sock files and report failed assertions.
    (#299, #300, #301 and #306 by @clue)

v1.12.0

25 Aug 12:36
Compare
Choose a tag to compare
  • 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

14 Jan 12:26
Compare
Choose a tag to compare
  • Feature: Full support for PHP 8.1 release.
    (#277 by @clue)

  • Feature: Avoid dependency on ext-filter.
    (#279 by @clue)

  • Improve test suite to skip FD test when hitting memory limit
    and skip legacy TLS 1.0 tests if disabled by system.
    (#278 and #281 by @clue and #283 by @SimonFrings)

v1.10.0

29 Nov 10:10
Compare
Choose a tag to compare
  • 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 errno and errstr.
    (#265, #266, #267, #270 and #271 by @clue and #268 by @SimonFrings)

    All error messages now always include the appropriate errno and errstr to
    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 as ECONNREFUSED) 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

03 Aug 12:51
Compare
Choose a tag to compare
  • Feature: Add new SocketServer and deprecate Server to avoid class name collisions.
    (#263 by @clue)

    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.

    // 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 Connector signature to take optional $context as first argument.
    (#264 by @clue)

    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.

     // 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

11 Jul 12:50
Compare
Choose a tag to compare

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();

v1.7.0

25 Jun 11:06
Compare
Choose a tag to compare
  • Feature: Support falling back to multiple DNS servers from DNS config.
    (#257 by @clue)

    If you're using the default Connector, it will now use all DNS servers
    configured on your system. If you have multiple DNS servers configured and
    connectivity to the primary DNS server is broken, it will now fall back to
    your other DNS servers, thus providing improved connectivity and redundancy
    for broken DNS configurations.

  • Feature: Use round robin for happy eyeballs DNS responses (load balancing).
    (#247 by @clue)

    If you're using the default Connector, it will now randomize the order of
    the IP addresses resolved via DNS when connecting. This allows the load to
    be distributed more evenly across all returned IP addresses. This can be
    used as a very basic DNS load balancing mechanism.

  • Internal improvement to avoid unhandled rejection for future Promise API.
    (#258 by @clue)

  • Improve test suite, use GitHub actions for continuous integration (CI).
    (#254 by @SimonFrings)