PHPackages                             feast/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. feast/pusher

ActiveLibrary

feast/pusher
============

Pusher plugin for the FEAST framework

v1.0.0-rc1(5y ago)02Apache-2.0PHPPHP ^8.0.0

Since Apr 20Pushed 5y agoCompare

[ Source](https://github.com/FeastFramework/pusher)[ Packagist](https://packagist.org/packages/feast/pusher)[ Docs](https://docs.feast-framework.com/addons/pusher.html)[ GitHub Sponsors](https://github.com/jpresutti)[ RSS](/packages/feast-pusher/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![FEAST Framework](https://github.com/FeastFramework/framework/raw/master/logos/feast-transparent-small.png?raw=true)](https://github.com/FeastFramework/framework/blob/master/logos/feast-transparent-small.png?raw=true)

[![PHPUnit](https://github.com/FeastFramework/pusher/workflows/PHPUnit/badge.svg?branch=master)](https://github.com/FeastFramework/pusher/workflows/PHPUnit/badge.svg?branch=master)[![Psalm Static analysis](https://github.com/FeastFramework/pusher/workflows/Psalm%20Static%20analysis/badge.svg?branch=master)](https://github.com/FeastFramework/pusher/workflows/Psalm%20Static%20analysis/badge.svg?branch=master)[![codecov](https://camo.githubusercontent.com/b821508f39ec0146b65e7f25191d24c3c39a28a8eb89d9260c40ec4b0e562fde/68747470733a2f2f636f6465636f762e696f2f67682f46656173744672616d65776f726b2f7075736865722f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d4957464f58536479525a)](https://codecov.io/gh/FeastFramework/pusher)

[![PHP Version](https://camo.githubusercontent.com/66e62c35152e48593077f06f19d82d9cdd482e7c9d7dfad6fa00d5faf1c94eeb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66656173742f6a736f6e)](https://camo.githubusercontent.com/66e62c35152e48593077f06f19d82d9cdd482e7c9d7dfad6fa00d5faf1c94eeb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66656173742f6a736f6e)[![Packagist](https://camo.githubusercontent.com/db5ca908798f8233bbf17d73ddb6b0a025b384b3665f2a7835e16f39688e4e66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66656173742f707573686572)](https://packagist.org/packages/feast/pusher)[![License](https://camo.githubusercontent.com/a06bf79cad893930bfce62248325afc2d71c10f1cdf668bc6abfc015c4706866/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f46656173744672616d65776f726b2f7075736865722e737667)](https://camo.githubusercontent.com/a06bf79cad893930bfce62248325afc2d71c10f1cdf668bc6abfc015c4706866/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f46656173744672616d65776f726b2f7075736865722e737667)[![Docs](https://camo.githubusercontent.com/5e2eb4a7d5597ab3127ffe94b3464fa149484bfb9c327fea1eac55fc349f78bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d717569636b73746172742d677265656e2e737667)](https://docs.feast-framework.com)

FEAST Pusher Plugin
===================

[](#feast-pusher-plugin)

This package is a plug to work with [Pusher](https://pusher.com)for [FEAST Framework](https://github.com/FeastFramework/framework)

[Installation](#installation)

[Usage](#configuration-and-usage)

Installation
------------

[](#installation)

Recommended installation uses composer. This allows for quick setup.

### Installing with Composer

[](#installing-with-composer)

Run `composer install feast/pusher`.

In `container.php`, add the following at the bottom of the file.

```
$container->add(\FeastFramework\Pusher\Pusher::class,new \FeastFramework\Pusher\Pusher());
```

### Manual installation

[](#manual-installation)

Alternatively, if you do not wish to use composer, this plugin can be manually installed by downloading and placed in a folder of your choosing if you do not wish to use composer. You will need to add a path mapping in `container.php`before adding Pusher to the container. Replace `src` in the block below with the path to your installation of the Pusher plugin.

```
/** @var \Feast\Autoloader $autoLoader */
$autoLoader->addPathMapping('FeastFramework\\Pusher', ['src']);
$container->add(\FeastFramework\Pusher\Pusher::class,new \FeastFramework\Pusher\Pusher());
```

Configuration and Usage
-----------------------

[](#configuration-and-usage)

### Configuration

[](#configuration)

The Pusher plugin is configured by adding an array into your `configs/config.php` that contains the necessary keys. See sample below. Note that if you name your configuration namespace `pusher`, then you do not need to pass it in to the various methods.

```
$environment['production'] = ['
    pusher' => [
        'cluster' => 'us2',
        'key' => 'Your-App-Key',
        'secret' => 'Your-Secret-Key',
        'appid' => 'App-ID'
    ]
];
```

### Injection and Instantiation

[](#injection-and-instantiation)

The Pusher plugin can be automatically injected into both controllers and plugin classes by type-hinting the argument `\FeastFramework\Pusher\Pusher`. To learn more about Dependency injection in FEAST, see the docs, [here](https://docs.feast-framework.com/service-container.html#dependency-injection)

Alternatively, you may directly instantiate by calling `new Pusher();`

### Usage

[](#usage)

The Pusher object has the following methods. All methods take various parameters as well as an optional configuration namespace. Methods return objects that represent the data from the pusher API. See the `src/Response` folder for details.

1. `getUsers` - get user information for a channel
    1. Parameters
        1. `channel`
        2. `pusherConfigNamespace` - defaults to `pusher`
2. `event` - Trigger a single event.
    1. Parameters
        1. `name` - The name of the event to trigger.
        2. `data` - An array or stdClass of data to pass to the event.
        3. `channels` - Either a single channel as a string, or an array of channels to publish to.
        4. `socketId` - Exclude the event from the given socket id if passed in. Defaults to null.
        5. `info` - An array of attributes which should be returned. Currently valid values are user\_count and subscription\_count.
        6. `pusherConfigNamespace` - defaults to `pusher`
3. `batchEvents` - Trigger multiple events.
    1. Parameters
        1. `eventData` - See the Pusher [docs](https://pusher.com/docs/channels/library_auth_reference/rest-api#post-batch-events-trigger-multiple-events-)for more info.
        2. `pusherConfigNamespace` - defaults to `pusher`
4. `channelInfo` - Fetch information for a single channel.
    1. Parameters
        1. `channel` - Channel name to fetch information for
        2. `infoType` - An array of attributes to fetch. Valid options are `user_count` and `subscription_count`.
        3. `pusherConfigNamespace` - defaults to `pusher`
5. `channelsInfo` - Fetch information for multiple channels
    1. Parameters
        1. `prefix` - Filter returned values by specified prefix. Defaults to null.
        2. `infoType` - An array of attributes to fetch. Valid option currently only `user_count`.
        3. `pusherConfigNamespace` - defaults to `pusher`

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1854d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6835477?v=4)[Jeremy Presutti](/maintainers/jpresutti)[@jpresutti](https://github.com/jpresutti)

---

Top Contributors

[![jpresutti](https://avatars.githubusercontent.com/u/6835477?v=4)](https://github.com/jpresutti "jpresutti (9 commits)")

### Embed Badge

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

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

PHPackages © 2026

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