PHPackages                             overstar/php-nacos - 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. overstar/php-nacos

ActiveLibrary

overstar/php-nacos
==================

php for nacos

v1.0.1(4y ago)518MITPHP

Since Jan 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/775397252/php-nacos)[ Packagist](https://packagist.org/packages/overstar/php-nacos)[ RSS](/packages/overstar-php-nacos/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Nacos 配置中心的PHP客户端
-----------------

[](#nacos-配置中心的php客户端)

### 开发计划

[](#开发计划)

- 配置中心
- \[实现服务发现\]
- Yii框架集成
- Laravel框架集成

### 安装

[](#安装)

```
composer require overstar/php-nacos
```

### 使用

[](#使用)

#### 设置配置文件保存路径

[](#设置配置文件保存路径)

默认是config目录

```
NacosConfig::setSavePath('path');
```

#### 获取配置文件

[](#获取配置文件)

```
// 参数：nacos地址,dataId,group,namespace
Nacos::init( "http://127.0.0.1:8848/", "console.php", "js", "0c1201b3-495a-4c14-9259-e798b64fb6e8" )
    ->run();
```

#### 长轮询拉取配置文件

[](#长轮询拉取配置文件)

```
Nacos::init( "http://127.0.0.1:8848/", "console.php", "js", "0c1201b3-495a-4c14-9259-e798b64fb6e8" )
    ->listener();

Nacos::init("http://127.0.0.1:8848/", ["db.php","web.php"], "js", "7e3d37db-2911-4074-950b-4b98b7a50243")
    ->listener();
```

#### 发布配置文件

[](#发布配置文件)

```
Nacos::init( "http://127.0.0.1:8848/", "console.php", "js", "0c1201b3-495a-4c14-9259-e798b64fb6e8" )
    ->publish("sdfsdfsdf","text");
```

#### 删除配置文件

[](#删除配置文件)

```
Nacos::init( "http://127.0.0.1:8848/", "console.php", "js", "0c1201b3-495a-4c14-9259-e798b64fb6e8" )
->delete();
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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 ~2 days

Total

2

Last Release

1586d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e7c88e48a292c2543ca922867862945256a37cceb05c78a373c64bdc99bad10?d=identicon)[775397252](/maintainers/775397252)

---

Tags

phpalibabanacos

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/overstar-php-nacos/health.svg)

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

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[hyperf/nacos

Nacos SDK

22487.9k10](/packages/hyperf-nacos)[huaweicloud/huaweicloud-sdk-php

Huawei Cloud SDK for PHP

1829.2k2](/packages/huaweicloud-huaweicloud-sdk-php)

PHPackages © 2026

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