mvanduijker/laravel-mercure-broadcaster
A Laravel broadcaster that sends your app's events to a Mercure hub for real-time updates over Server-Sent Events. Skip Pusher and websockets: publish model changes and notifications to browsers with a simple, lightweight setup that plugs into Laravel's existing broadcasting system.
What this release is. 3.9.0 is a single-change release: a Laravel 13.x compatibility PR from Laravel Shift. No new features, no config changes, no deprecations, no breaking changes. For planning purposes treat it as a routine forward-compatibility bump — low urgency, but a positive maintenance signal (the maintainer is tracking upstream framework releases promptly).
Architecture fit. mvanduijker/laravel-mercure-broadcaster plugs Mercure into Laravel's existing broadcast abstraction. It registers a mercure broadcast driver so broadcast(new OrderShipped(...)) flows through the same ShouldBroadcast events, channels, and queue plumbing already used for Pusher/Ably/Reverb. That is the package's main TPM-relevant property: it is an adapter, not a platform. It commits us to running a Mercure hub (Caddy with the Mercure module, or FrankenPHP) as an additional stateful service, and it shifts real-time transport from WebSocket to Server-Sent Events over HTTP/2.
Integration feasibility. Server side is close to trivial: publish config, set BROADCAST_CONNECTION=mercure, supply hub URL, public URL, and a JWT secret. The friction is on the client side — Laravel Echo has no first-party Mercure connector, so the front end must use the mercure JS library or raw EventSource plus a private-subscription endpoint that mints subscriber JWTs. That is a bespoke front-end workstream, not a config change, and it is the item most likely to be underestimated.
Technical risk.
mercure.subscribe/publish claims. Misconfiguration fails open or closed silently depending on hub config — needs an explicit test.Key questions for the maintainer/team.
Stack fit. Best fit is a Laravel app already broadcasting domain events, with an HTTP/2-capable edge (Caddy, FrankenPHP, or a TLS-terminating proxy that does not buffer text/event-stream). Poor fit if we are on shared hosting, behind an aggressive buffering CDN, or need bidirectional client→server messaging — SSE is one-way by design.
Migration path (from Pusher/Ably/Reverb).
mercure as a second connection in config/broadcasting.php.php artisan tinker → dispatch a test event)./broadcast/auth equivalent that issues scoped subscriber JWTs, plus front-end EventSource wiring. Prototype on one low-risk feature.Compatibility notes.
^3.9 and let Composer resolve.symfony/mercure constraint is compatible with the hub version we deploy — this is the most common source of "works locally, fails in staging."Sequencing.
Maintenance. Low code-maintenance load — the package is small and changes rarely, and 3.9.0 shows the maintainer responds to framework releases. The recurring cost is dependency hygiene: bumping the package alongside Laravel majors, and keeping the hub image patched. Budget roughly a half-day per Laravel major plus monthly patch review.
Support model. Two distinct on-call surfaces: (a) the Laravel app, already covered; (b) the Mercure hub, which is new. The hub needs an owner, a health check, log aggregation, and a documented restart procedure. Without that, SSE failures will be triaged against the wrong team.
Scaling characteristics.
Failure modes to instrument.
Ramp-up. Estimate one to two days for a Laravel developer to be productive server-side, and three to five days for the front-end work (EventSource lifecycle, reconnect/backoff, private topic authorization, testing SSE in CI — which is genuinely awkward). Add a half-day of platform onboarding for the hub. The package itself is learnable in an hour; the surrounding protocol and auth model is where the time goes.
Recommendation. Adopt 3.9.0 as the pinned version if Mercure is the chosen real-time path — it clears the Laravel 13 blocker at no cost. Do not treat it as a reason to choose Mercure; that decision rests on whether one-way SSE fan-out, cheap horizontal read scaling, and no per-connection vendor pricing outweigh the cost of running and owning a hub plus custom front-end integration.
How can I help you explore Laravel packages today?