PHPackages                             sevenlinx/pubsub-redis-php - 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. [Caching](/categories/caching)
4. /
5. sevenlinx/pubsub-redis-php

ActiveLibrary[Caching](/categories/caching)

sevenlinx/pubsub-redis-php
==========================

Redis driver in PubSub

03PHP

Since Apr 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/seven-linx-incorporated/pubsub-redis-php)[ Packagist](https://packagist.org/packages/sevenlinx/pubsub-redis-php)[ RSS](/packages/sevenlinx-pubsub-redis-php/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PubSub Redis Driver (PHP)
=========================

[](#pubsub-redis-driver-php)

---

Requirements
------------

[](#requirements)

- PHP `^8.0`
- [ext-phpredis](https://github.com/phpredis/phpredis) - For Redis extension and `PhpRedisConnector` (**RECOMMENDED**)
- [predis/predis](https://github.com/predis/predis) - For `PredisConnector`

---

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

[](#installation)

There are two (2) types for Redis client, that needs to install, see [Requirements](#requirements)

- [ext-phpredis](https://github.com/phpredis/phpredis) - PHP Extension for Redis, need to build PHP
- [predis/predis](https://github.com/predis/predis) - Pure PHP client for Redis

As soon you have any of the client, you may:

```
composer require sevenlinx/pubsub-redis-php
```

---

Implement your own Redis connector
----------------------------------

[](#implement-your-own-redis-connector)

You may implement your own Redis client decorator, by implementing `\SevenLinX\PubSub\Redis\Contracts\ConnectorContract`

```
use SevenLinX\PubSub\Redis\Contracts\ConnectorContract;

class MyOwnConnector implements ConectorContract
{
    ...
    public function publish(ChannelContract $channel, MessageContract $message): int
    {
        return $this->client->publish($channel->name(), $message->payload());
    }

    public function subscribe(ChannelContract|array $channels, Closure $handler): void
    {
        $this->client->subscribe($channels->name(), [$handler, 'handle']);
    }
}

// subscribe.php
$driver = new RedisDriver(new MyOwnConnector());
$driver->subscribe(new GenericChannel(), function(GenericPayload $payload, redis) {
    var_dump($payload);
});
```

---

Example
-------

[](#example)

You can check on `examples/` directory

**/!\\ NOTE: This requires an existing redis server /!\\**

---

Testing
-------

[](#testing)

```
composer run testing
```

---

###### Created under [Seven LinX Incorporated](https://sevenlinx.tech)

[](#created-under-seven-linx-incorporated)

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ccb2da23632346595380271ccb477d6f054912dde484fb463818d2d5b5b0ae19?d=identicon)[jayaregalinada](/maintainers/jayaregalinada)

---

Top Contributors

[![jayaregalinada](https://avatars.githubusercontent.com/u/1170288?v=4)](https://github.com/jayaregalinada "jayaregalinada (8 commits)")

### Embed Badge

![Health badge](/badges/sevenlinx-pubsub-redis-php/health.svg)

```
[![Health](https://phpackages.com/badges/sevenlinx-pubsub-redis-php/health.svg)](https://phpackages.com/packages/sevenlinx-pubsub-redis-php)
```

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[rapidwebltd/rw-file-cache

RW File Cache is a PHP File-based Caching Library. Its syntax is designed to closely resemble the PHP memcache extension.

15196.8k7](/packages/rapidwebltd-rw-file-cache)[yuzuru-s/redis-recommend

Wrapping Redis's sorted set APIs for specializing recommending operations.

392.9k](/packages/yuzuru-s-redis-recommend)

PHPackages © 2026

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