denis660/laravel-centrifugo
Laravel integration for Centrifugo real-time messaging: broadcasting driver, HTTP API client, JWT authentication, channel subscriptions, presence and publish helpers. Easily add scalable WebSocket updates to Laravel apps.
Architecture fit
The package sits in the Laravel broadcasting layer as a custom broadcaster driver for Centrifugo, exposing a CentrifugoInterface container binding and mapping transport failures into Laravel's native BroadcastException. That is the correct seam: it keeps Centrifugo behind Laravel's existing broadcast() / ShouldBroadcast contracts rather than introducing a parallel eventing path. Teams already on the broadcasting abstraction can adopt it without re-architecting domain events.
Integration feasibility
v5.3 materially improves feasibility. The centrifuge:install rework for Laravel 9–13 app structures removes the most common onboarding failure mode (installer assumptions about skeleton layout, which changed repeatedly between L9 and L13). Explicit Laravel 13 support means the package is tracking framework releases rather than lagging. Adding fresh-install E2E coverage for Laravel apps means installation is now verified in CI rather than assumed.
Technical risk The changelog is dominated by bug fixes, not features: auth token generation previously used the wrong identity, transport failures were not normalized, and the container binding was broken. Two of these are behavioural corrections, which carries upgrade risk:
bind() override, that workaround may now conflict or be silently redundant.BroadcastException. Failures that were previously swallowed or surfaced inconsistently may now propagate.Key questions
Verdict: Low-to-moderate risk, net positive. The release is a quality and compatibility release rather than a capability release, and it retires several known-bad behaviours. Recommend adopting on a pinned version with staged validation of the auth path.
Stack fit
Assumes Laravel 9–13, a running Centrifugo server, and centrifuge-js on the client for private/websocket subscriptions. The package now ships a real private-subscribe E2E using centrifuge-js, which is meaningful evidence that the client/server contract is verified end to end rather than mocked. Applications using Pusher or Redis broadcasting have no reason to move; applications with high-fanout or high-concurrency realtime needs and an existing Centrifugo deployment are the natural fit.
Migration path
CentrifugoInterface, token generation, or raw transport exception handling.composer require the v5.3 constraint, then re-run centrifuge:install (its behaviour changed for L9–13 structures) and diff the generated config against the existing one rather than overwriting.BroadcastException and confirm no raw transport exceptions escape.Compatibility Verify the PHP constraint and the Centrifugo server version before committing. The Laravel 13 claim should be read as "supported," not "Laravel 13 required" — confirm the package still runs on the L9/L10 versions in the estate. If multiple Laravel majors are in the fleet, the installer rework is the main compatibility win and should be exercised on the oldest supported skeleton, not just the newest.
Sequencing
Do the auth-token validation first and in isolation, since it is the only change with plausible semantic breakage. Installer and config changes second. Exception-handling updates third, and only after observing real failure output in staging. Client-side centrifuge-js work is independent and can be scheduled in parallel, but private-subscribe flows should be re-tested against the new token behaviour before the release is signed off.
Maintenance
Positive signals: active CI (actions/checkout@v6), PHPUnit warning cleanup, Docker-based Centrifugo integration checks, and E2E coverage. This is the profile of a maintained package rather than a dormant one. Budget for periodic config republishing when installers change, and track Laravel major releases since the package follows them closely.
Support Docs were refreshed for Laravel 13 and current compatibility, which reduces the support burden on internal platform teams. Upstream responsiveness is unknown from the changelog alone — establish a fallback plan (fork or driver replacement) if the package stalls, though the thin surface area makes a fork tractable.
Scaling The package is a thin translation layer; scaling characteristics are determined by the Centrifugo server, which is designed for horizontal fanout. Broadcasting throughput scales with Centrifugo nodes and the HTTP API path, not with this package. The main scaling consideration is connection/auth volume against the token generation path — worth load-testing the private-subscribe handshake rather than just publish throughput.
Failure modes
BroadcastException; unhandled, these can turn a degraded Centrifugo into user-facing broadcast errors where previously they were silent. Silent failure becoming loud is an improvement but will look like a regression in incident graphs.Ramp-up
Low. The install command rework and fresh-install E2E coverage lower the cost of getting a new Laravel app onto Centrifugo, and the broadcasting abstraction means Laravel developers need little Centrifugo-specific knowledge for the publish path. The private-subscribe and authorization path is the only area requiring real expertise — allocate onboarding time there, and pair it with the centrifuge-js E2E as a reference implementation.
Recommendation: Adopt v5.3 with a pinned constraint. Treat the auth token fix as a breaking change in internal change management, validate the private-subscribe path in staging before rollout, and add a smoke test asserting BroadcastException on transport failure so the normalization is covered by the team's own suite rather than only upstream's.
How can I help you explore Laravel packages today?