Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Centrifugo Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Auth token identity change — tokens now bind to the authenticated Laravel user id. Any application that compensated for the previous behaviour (custom token minting, a forked broadcaster, or channel authorization that assumed a different subject) will change behaviour on upgrade. This is the single highest-risk item and should be treated as a potential breaking change even though it is labelled a fix.
  • Container binding fix — if a team worked around the broken binding via a custom service provider or bind() override, that workaround may now conflict or be silently redundant.
  • Transport failure normalization — code catching raw Guzzle/HTTP exceptions from the client will no longer match; it must catch BroadcastException. Failures that were previously swallowed or surfaced inconsistently may now propagate.

Key questions

  1. Is Laravel 13 GA or pre-release at the time of adoption, and what is the package's minimum PHP constraint?
  2. Which Centrifugo server versions are supported, and does v5.3 change the required server-side API/auth contract?
  3. Is the auth token change documented as breaking, with a migration note for anyone who worked around the old behaviour?
  4. Are the Docker-based integration checks part of the release gate for tagged versions, or advisory only?
  5. What is the supported upgrade path from v5.2 — is a config republish required after the installer changes?
  6. Does the package publish a deprecation policy ahead of v6?

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.

Integration Approach

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

  1. Pin the current version, read the diff for the auth token change, and grep the codebase for any local workaround around CentrifugoInterface, token generation, or raw transport exception handling.
  2. Upgrade in a non-production environment: 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.
  3. Validate the auth path explicitly: confirm tokens are minted for the intended user id and that channel authorization subscribers still resolve the expected identity.
  4. Update exception handling to catch BroadcastException and confirm no raw transport exceptions escape.
  5. Promote to production behind the existing broadcaster config, keeping the previous driver config available for rollback.

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.

Operational Impact

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

  • Auth token identity regression or mismatch after upgrade — highest-impact, hardest to detect without a real subscribe test.
  • Transport failures now surface as 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.
  • Container binding changes can collide with local overrides at boot, producing resolution errors that appear only under specific provider load orders.
  • Installer changes can produce divergent config between environments if some hosts were provisioned under the old installer.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel