react/socket-client
Async, event-driven TCP/IP socket client for ReactPHP. Provides promise-based connectors for plain TCP, secure TLS, and Unix domain sockets, plus DNS resolution, connection timeouts, and a flexible ConnectorInterface for custom transports.
react/event-loop, or a standalone daemon) rather than a queue job.SecureConnector half of this package is where you decide on certificate verification defaults, SNI handling, and timeouts — a decision that touches security review, not just engineering.Caveat that should frame every one of the above: this package is archived and superseded. react/socket-client was merged into react/socket, which is the actively maintained home for both client and server sockets. Any decision "supported" by this package should be re-run against react/socket before it reaches a plan.
Consider it only in these narrow situations:
ConnectorInterface, TcpConnector, and SecureConnector — the code is a clean teaching artifact.react/socket-client and upgrading the whole tree is out of scope for the current cycle.Look elsewhere — specifically at react/socket — when:
[Legacy] marker.ConnectorInterface improvements, DNS-over-HTTPS resolution, happy-eyeballs-style connection racing, or HTTP proxy support.react/socket gives you both under one dependency.react/http (built on react/socket) or Guzzle's async handler — do not hand-roll HTTP over a raw TCP connector.For executives: This is a small, MIT-licensed piece of plumbing that lets PHP hold open a network connection and stream data without tying up a web worker. It is not a product; it's a building block. The headline is that it is end-of-life — the functionality now lives in a maintained sibling package (react/socket). Recommendation: approve the capability if we have a streaming or persistent-connection requirement, but budget it as "adopt react/socket, not this," and treat any existing usage as technical debt to schedule rather than a platform to build on.
For engineering: react/socket-client is the deprecated half of ReactPHP's socket layer — async ConnectorInterface implementations for plaintext TCP and TLS. It was folded into react/socket, which is where all fixes since 2017 have landed. Do not add it to composer.json. If a transitive dependency drags it in, that's a migration ticket. If we need the capability, the correct entry point is react/socket with react/event-loop, run under a supervised long-lived process (Octane or a dedicated daemon), with explicit connect/read timeouts and TLS verification left on. Budget for the operational cost of an event loop — it is a different runtime model from PHP-FPM and the on-call story needs to reflect that.
Net PM position: capability is real and occasionally necessary; this specific package is not the vehicle. Score it as a migration source, not an adoption candidate.
How can I help you explore Laravel packages today?