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.
composer require and a credentials config — a strong default when real-time is table stakes, not the product's differentiator.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.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.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.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.trigger call, which constrains channel architecture and must be decided before client work starts.Consider it when:
private-encrypted- channels satisfy this.Look elsewhere (or reconsider) when:
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.
How can I help you explore Laravel packages today?