You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone! We're working on reviving Ratchet in #1054, but we've also been thinking bigger. What if we could build something truly modern for WebSockets in PHP?
What this could look like
Here's the API we're envisioning: a clean, event-driven client API inspired by common WebSocket APIs found in modern browsers:
$ws = newWebSocket('ws://127.0.0.1:8080/');
$ws->on('open', function () use ($ws): void {
echo"WebSocket connection opened\n";
$ws->send("Hello, WebSocket!");
});
$ws->on('message', function (string$message): void {
echo"Received message: $message\n";
});
Likewise, the same WebSocket API could be used on the server side, providing the same look and feel. Additionally, this creates a clear separation between the WebSocket application layer and the underlying socket layer provided by ReactPHP:
$echo = function (WebSocket$ws): void {
$ws->on('message', function (string$message) use ($ws): void {
echo"Received message: $message\n";
$ws->send($message); // Echo back
});
};
$http = newHttpServer(newWebSocketHandler($echo));
$socket = newSocketServer('127.0.0.1:8080');
$http->listen($socket);
Similarly, this would allow us to use existing framework integrations to add routing support, mix multiple HTTP and WebSocket endpoints in a single application, add smart fallbacks, and much more:
Ratchet today: We've recently squashed deprecation warnings, added PHP 8.4+ compatibility, and prioritized critical bugs with #1054 and dozens of linked tickets. Thanks to our 11 sponsors who helped kickstart this work to help us revive Ratchet! 🙏
The reality: Full modernization of Ratchet would require breaking changes, complete docs overhaul, and updating all dependencies. Instead of duct taping an aging codebase, we're proposing Sprocket.
What Sprocket offers:
✅ Clean, developer-friendly API (goodbye magic properties!)
✅ Consistent WebSocket API for both client and server applications
✅ WebSocket features that meet 2025 standards
✅ First-class ReactPHP integration
✅ PHP 8.1+ readiness out of the gate (sorry PHP 7.x users 😢)
✅ Documentation that actually helps (they've gathered some dust 📚)
Making This Happen
The reality: Building a modern, well-documented WebSocket toolkit from scratch requires substantial resources. Without proper support, Sprocket remains an idea. With your support, we can deliver a toolkit that serves the PHP community for years.
For any devs using Ratchet in their company (hello to the 47+ companies from #1054): We'd really like to hear from you about how you're using Ratchet and your thoughts on Sprocket. We'd love to explore different collaboration models - partnerships, consulting arrangements, priority support, migration assistance, or other ways to work together. Reach out if this applies to you (check my profile for contact)!
How you can help:
Support the project - become a sponsor through ReactPHP ❤️
Share this with developers using Ratchet/Pawl/Reverb (especially the 47+ companies from #1054)
Reach out - for any companies, discuss with your engineering teams, and reach out directly to discuss collaboration options
Contribute - early adopters get bragging rights 😎
Vote - an upvote helps us gauge interest and shows potential supporters there's real demand
Your feedback in #1054 showed how many developers rely on WebSockets in PHP. Let's build something awesome together! 🚀
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone! We're working on reviving Ratchet in #1054, but we've also been thinking bigger. What if we could build something truly modern for WebSockets in PHP?
What this could look like
Here's the API we're envisioning: a clean, event-driven client API inspired by common WebSocket APIs found in modern browsers:
Likewise, the same WebSocket API could be used on the server side, providing the same look and feel. Additionally, this creates a clear separation between the WebSocket application layer and the underlying socket layer provided by ReactPHP:
Similarly, this would allow us to use existing framework integrations to add routing support, mix multiple HTTP and WebSocket endpoints in a single application, add smart fallbacks, and much more:
Why we need this
Ratchet today: We've recently squashed deprecation warnings, added PHP 8.4+ compatibility, and prioritized critical bugs with #1054 and dozens of linked tickets. Thanks to our 11 sponsors who helped kickstart this work to help us revive Ratchet! 🙏
The reality: Full modernization of Ratchet would require breaking changes, complete docs overhaul, and updating all dependencies. Instead of duct taping an aging codebase, we're proposing Sprocket.
What Sprocket offers:
✅ Clean, developer-friendly API (goodbye magic properties!)
✅ Consistent WebSocket API for both client and server applications
✅ WebSocket features that meet 2025 standards
✅ First-class ReactPHP integration
✅ PHP 8.1+ readiness out of the gate (sorry PHP 7.x users 😢)
✅ Documentation that actually helps (they've gathered some dust 📚)
Making This Happen
The reality: Building a modern, well-documented WebSocket toolkit from scratch requires substantial resources. Without proper support, Sprocket remains an idea. With your support, we can deliver a toolkit that serves the PHP community for years.
For any devs using Ratchet in their company (hello to the 47+ companies from #1054): We'd really like to hear from you about how you're using Ratchet and your thoughts on Sprocket. We'd love to explore different collaboration models - partnerships, consulting arrangements, priority support, migration assistance, or other ways to work together. Reach out if this applies to you (check my profile for contact)!
How you can help:
Your feedback in #1054 showed how many developers rely on WebSockets in PHP. Let's build something awesome together! 🚀
Beta Was this translation helpful? Give feedback.
All reactions