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

Pusher Php Server Laravel Package

pusher/pusher-php-server

Official PHP library for the Pusher Channels HTTP API. Install via Composer, create a Pusher instance with your app credentials, and publish events or authenticate channels from PHP 7.3–8.4, including Laravel broadcasting.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Real-time feature bets: live notifications, activity feeds, chat/messaging, collaborative editing signals, live dashboards, auction/price tickers, multiplayer state sync. This library is the server-side publish + auth + webhook layer for all of those; the client is a separate JS SDK, so budget for both.
  • Build vs. buy: replaces a self-built WebSocket tier (socket servers, connection state, fan-out, reconnection, auth). Buying moves weeks of infra work into a composer require and a credentials config — a strong default when real-time is table stakes, not the product's differentiator.
  • Managed vs. self-hosted: the host / port / scheme / path options let the same code point at a self-hosted Pusher-protocol server (Soketi, Laravel Reverb). This is the key strategic lever: adopt now on managed infrastructure, retain the option to migrate to in-house hosting later without rewriting application code.
  • Feature scope via channel types: authorizeChannel (private), authorizePresenceChannel + authenticateUser (presence/"who's online"), and private-encrypted- channels (end-to-end encryption where Pusher cannot read payloads) map cleanly to roadmap tiers — public feed → authenticated feed → team presence → regulated/compliance-sensitive messaging.
  • UX and retention decisions: socket_id exclusion prevents echo of a sender's own message (a real chat complaint), and triggerBatch (max 10 events/call) bounds cost for fan-out and notification bursts.
  • Instrumentation without new tooling: getChannelInfo (user_count, subscription_count) and getChannels(['filter_by_prefix' => ...]) plus signed webhooks give PMs concurrent-user and channel-engagement metrics that can serve as a north-star or adoption KPI before analytics maturity.
  • Reliability/security posture: webhook signature verification, PSR-3 logging, and injectable Guzzle client (middleware, retries, tracing) are the pieces needed to pass security review and to instrument failure rates.
  • Launch sequencing: ship server-side publishing and private-channel auth first (lowest risk), defer presence and E2E encryption to a later milestone — E2E in particular cannot mix encrypted and unencrypted channels in one trigger call, which constrains channel architecture and must be decided before client work starts.

When to Consider This Package

Consider it when:

  • You are on Laravel 8.29+ (native broadcasting driver) or plain PHP 7.3–8.4 and need server-initiated events today.
  • The dominant traffic pattern is server → client (notifications, feeds, dashboards), with only light client-to-server needs.
  • You want presence, private-channel authorization, and signed webhooks without building an auth/verification layer.
  • You have a compliance requirement that message payloads never be readable by the transport vendor — private-encrypted- channels satisfy this.
  • You need it live in days, not quarters, and are willing to pay per connection/message for that speed.

Look elsewhere (or reconsider) when:

  • Cost dominates at scale: per-connection and per-message pricing becomes a roadmap constraint above modest concurrency; self-hosted Pusher-protocol servers (Reverb, Soketi) are the natural successor — the swap is configuration, not code, so treat this as a planned migration path rather than a blocker.
  • You need durable history, replay, or message search: Channels is fire-and-forget; persistence is your database's job. A product requirement for "scroll back through history" or "replay missed events" is a schema decision, not a Pusher one.
  • You need offline delivery: this does not replace APNs/FCM push or email; plan those as separate channels in the notification strategy.
  • You need rich bidirectional or high-frequency client-to-server messaging (collaborative editing at scale, in-app voice/video) — evaluate dedicated realtime platforms or WebRTC instead.
  • You are not on PHP (checkout/edge services in Node or Go) — use the corresponding official SDK; do not proxy through PHP.
  • Your team already standardized on another realtime vendor — consolidation usually beats a second integration.

How to Pitch It (Stakeholders)

To executives: this is a small, official, actively released SDK (PHP 7.3–8.4, releases through 2026) that lets us ship real-time notifications, presence, and live updates in days instead of building and operating a WebSocket tier. We buy speed and reliability, not a platform: the code targets the Pusher protocol, so we can move to self-hosted infrastructure later by changing configuration rather than rewriting features — which caps long-term vendor exposure. Security review is covered by end-to-end encrypted channels and signed webhook verification.

To engineering: official vendor library, thin surface (trigger, triggerBatch, async variants, channel/presence auth, webhook parsing, channel queries). PSR-3 logging and a pluggable Guzzle client mean our existing observability and middleware apply unchanged; promises allow non-blocking publishing off the request path. Laravel's broadcasting driver is already wired for it. Known constraints to design around: 10 events per batch, no mixed encrypted/unencrypted recipients in one call, no message persistence, and no client-to-server event bus.

To finance/ops: predictable subscription cost at launch, with a documented escape hatch (protocol-compatible self-hosting) if concurrency growth outpaces the budget. The decision to revisit is trigger-based — a concurrency or spend threshold — not a vague future review.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings