PHPackages                             cheer/neptune-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. [Database &amp; ORM](/categories/database)
4. /
5. cheer/neptune-php

ActiveLibrary[Database &amp; ORM](/categories/database)

cheer/neptune-php
=================

Redis Connection pool client

v0.0.1(7y ago)012MITPHPPHP &gt;=5.6.3

Since Feb 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zhuCheer/neptune-php)[ Packagist](https://packagist.org/packages/cheer/neptune-php)[ RSS](/packages/cheer-neptune-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

neptune-php 一个redis连接池客户端
=========================

[](#neptune-php-一个redis连接池客户端)

#### 介绍

[](#介绍)

这是一个php调用grpc服务使用redis连接池的一个客户端封装包； 使用该包你可以快速的连接并使用 [neptune](https://github.com/zhuCheer/neptune)（一个redis连接池服务端） 项目

#### 环境说明

[](#环境说明)

- php5.6+
- 安装 grpc 扩展

#### 安装

[](#安装)

使用 Composer 包管理

```
composer require cheer/neptune-php

```

#### 使用说明

[](#使用说明)

- 首先需要将 [neptune](https://github.com/zhuCheer/neptune)服务端运行起来；直接到该项目下 Release 里面下载对应编译好的程序；
- 调用示例：

```
require 'vendor/autoload.php';

//redis 连接信息
$option = [
    'ip'=>'192.168.137.100',
    'port'=>'6379',
    //'auth'=>'123456',//没有密码直接忽略
    'db_num'=>5,//需要存储到redis的库编号
    'init_cap'=>10,//初始连接数
    'max_cap'=>50,//最大连接数
    'timeout'=>30,//连接超时时间，超时后会释放连接
];

$server = '192.168.137.1:50033';//grpc服务端绑定ip端口

$client = new \Cheer\NeptuneClient\Client($server, $option);
$registerId = $client->registerPool();//进行连接池注册，注册后得到一个连接池ID，可以保存下来
//$client->setRegisterId($registerId);//如果已经保存了连接池ID直接调用该方法即可，无需重复调用注册方法
$key = "NeptuneClient";
$info = ['id'=>1,'info'=>'Hello World', 'time'=>time()];

$ret = $client->set($key, serialize($info));

```

#### proto生成php类

[](#proto生成php类)

如果希望对项目进行开发修改proto文件后需要重新生成 proto 类文件；

生成需要安装 proto 和 grpc\_php\_plugin 然后到项目目录中执行如下命令；

```
protoc --proto_path=./ --php_out=../grpc/ --grpc_out=../grpc/ --plugin=protoc-gen-grpc=/usr/local/bin/grpc_php_plugin  redis.proto

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

2700d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5835853?v=4)[chase](/maintainers/zhuCheer)[@zhuCheer](https://github.com/zhuCheer)

---

Top Contributors

[![zhuCheer](https://avatars.githubusercontent.com/u/5835853?v=4)](https://github.com/zhuCheer "zhuCheer (2 commits)")

### Embed Badge

![Health badge](/badges/cheer-neptune-php/health.svg)

```
[![Health](https://phpackages.com/badges/cheer-neptune-php/health.svg)](https://phpackages.com/packages/cheer-neptune-php)
```

###  Alternatives

[google/gax

Google API Core for PHP

268111.6M515](/packages/google-gax)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[googleads/google-ads-php

Google Ads API client for PHP

3478.1M11](/packages/googleads-google-ads-php)[temporal/sdk

Temporal SDK

4102.7M22](/packages/temporal-sdk)[colopl/laravel-spanner

Laravel database driver for Google Cloud Spanner

101131.1k1](/packages/colopl-laravel-spanner)[clarifai/clarifai-php-grpc

Clarifai PHP gRPC client

1229.3k](/packages/clarifai-clarifai-php-grpc)

PHPackages © 2026

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