PHPackages                             api-clients/pusher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. api-clients/pusher

ActiveLibrary[HTTP &amp; Networking](/categories/http)

api-clients/pusher
==================

Async first Pusher client

1.2.0(6y ago)36157.7k—0%11[4 PRs](https://github.com/php-api-clients/pusher/pulls)1MITPHPPHP ^7.2

Since May 22Pushed 2y ago6 watchersCompare

[ Source](https://github.com/php-api-clients/pusher)[ Packagist](https://packagist.org/packages/api-clients/pusher)[ Docs](https://php-api-clients.org/clients/pusher)[ RSS](/packages/api-clients-pusher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (11)Versions (16)Used By (1)

Pusher API Client for PHP 7 and 8
=================================

[](#pusher-api-client-for-php-7-and-8)

[![Linux Build Status](https://camo.githubusercontent.com/891712ad06ca8fb3767f8057b83f9fc365bc17801aa7d645350960d5b901a80e/68747470733a2f2f7472617669732d63692e6f72672f7068702d6170692d636c69656e74732f7075736865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/php-api-clients/pusher)[![Latest Stable Version](https://camo.githubusercontent.com/5737cee22f7983a6b5b0c358456dfd4c93bf1973fef412ffa95ea7dce5cd59e1/68747470733a2f2f706f7365722e707567782e6f72672f6170692d636c69656e74732f7075736865722f762f737461626c652e706e67)](https://packagist.org/packages/api-clients/pusher)[![Total Downloads](https://camo.githubusercontent.com/9e4aa3723440eb2d9d84b38dedd050ebe513bba9b27ea340d88e742063c0c16d/68747470733a2f2f706f7365722e707567782e6f72672f6170692d636c69656e74732f7075736865722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/api-clients/pusher)[![Code Coverage](https://camo.githubusercontent.com/a2908cb84501f42c20ec8ea375be8d52bb23d0fc7a1734f2d157a160c4f89e88/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068702d6170692d636c69656e74732f7075736865722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/php-api-clients/pusher/?branch=master)[![License](https://camo.githubusercontent.com/a5fab53e9a668272d3915438cd8c4943fad201febdf5883d51dc1b3fb8ef0ffc/68747470733a2f2f706f7365722e707567782e6f72672f6170692d636c69656e74732f7075736865722f6c6963656e73652e706e67)](https://packagist.org/packages/api-clients/pusher)[![PHP 7 ready](https://camo.githubusercontent.com/290e7e8ef6837e55b0f667e6b438624a7e781903dedc6e7ce20a057d8b933d88/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f7068702d6170692d636c69656e74732f7075736865722f62616467652e737667)](https://appveyor-ci.org/php-api-clients/pusher)

Installation
============

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require api-clients/pusher
```

Usage
=====

[](#usage)

```
$loop = Factory::create();
$client = AsyncClient::create($loop, 'Application ID here');
// OR when you need to specify the cluster
$client = AsyncClient::create($loop, 'Application ID here', null, 'cluster-here');

$client->channel('channel_name')->subscribe(
    function (Event $event) { // Gets called for each incoming event
        echo 'Channel: ', $event->getChannel(), PHP_EOL;
        echo 'Event: ', $event->getEvent(), PHP_EOL;
        echo 'Data: ', json_encode($event->getData()), PHP_EOL;
    },
    function ($e) { // Gets called on errors
        echo (string)$e;
    },
    function () { // Gets called when the end of the stream is reached
        echo 'Done!', PHP_EOL;
    }
);

$loop->run();
```

For more examples see the [examples directory](examples).

Features
========

[](#features)

This project aims to be 100% compatible with [Pusher's features](https://pusher.com/features) in `v1.3`.

- Subscribe to channels
- Presence channels
- Authentication

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2017 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 72.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~148 days

Recently: every ~173 days

Total

6

Last Release

2459d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.2.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (149 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 commits)")[![davidwdan](https://avatars.githubusercontent.com/u/4969183?v=4)](https://github.com/davidwdan "davidwdan (13 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (5 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (2 commits)")[![robsonvn](https://avatars.githubusercontent.com/u/6492949?v=4)](https://github.com/robsonvn "robsonvn (1 commits)")[![Darkflib](https://avatars.githubusercontent.com/u/101405?v=4)](https://github.com/Darkflib "Darkflib (1 commits)")

---

Tags

api-clientasyncasync-phphacktoberfestphpphp-api-clientsphp7pusherpusher-clientreactphpwebsocket

### Embed Badge

![Health badge](/badges/api-clients-pusher/health.svg)

```
[![Health](https://phpackages.com/badges/api-clients-pusher/health.svg)](https://phpackages.com/packages/api-clients-pusher)
```

###  Alternatives

[lob/lob-php

The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors.

664.0M4](/packages/lob-lob-php)[nystudio107/craft-retour

Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding &amp; restructuring a website

40975.2k15](/packages/nystudio107-craft-retour)[domraider/rxnet

Rx connector for PHP

1308.6k1](/packages/domraider-rxnet)[rx/websocket

Websockets for PHP using Rx

34181.5k2](/packages/rx-websocket)[rx/http

Http Client for RxPHP

221.5k2](/packages/rx-http)[drift/http-kernel

Http Kernel component for Drift, based on Symfony Http Kernel component

3624.1k17](/packages/drift-http-kernel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
