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

ActiveLibrary

exewen/nacos
============

A nacos component for Exewen.

v2.1.0(1y ago)0511MITPHPPHP &gt;=7.3

Since May 27Pushed 1y ago1 watchersCompare

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

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

复制配置
----

[](#复制配置)

```
cp -rf ./publish/exewen /your_project/config
```

初始化
---

[](#初始化)

```
!defined('BASE_PATH_PKG') && define('BASE_PATH_PKG', dirname(__DIR__, 1));
# 设置配置保存/读取路径
\Exewen\Utils\FileUtil::setSnapshotPath(dirname(__DIR__) . "/config/nacos/env");
```

nacos
-----

[](#nacos)

```
use Exewen\Nacos\NacosFacade;

# 获取配置文件
NacosFacade::getConfig($this->namespaceId, $this->dataId, $this->group);

# 获取并保存配置文件
NacosFacade::saveConfig($this->namespaceId, $this->dataId, $this->group);

# 读取本地配置文件
$configPath = \Exewen\Utils\FileUtil::getSnapshotFile($this->namespaceId, $this->dataId, $this->group);

# 注册实例
NacosFacade::setInstance($this->namespaceId, $this->serviceName, $this->group, $ip, $port);

# 发送心跳
NacosFacade::setInstanceBeat($this->namespaceId, $this->serviceName, $this->group, $ip, $port);

# 获取实例列表
NacosFacade::getInstance($this->namespaceId, $this->serviceName, $this->group, true);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance51

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

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

Every ~56 days

Recently: every ~69 days

Total

7

Last Release

376d ago

Major Versions

v1.1.1 → v2.0.02025-03-24

PHP version history (2 changes)v1.0.0PHP &gt;=7.3

v1.1.0PHP &gt;=7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f67ab9c12b404ad0421408edf24832eff0d0d7c750c85a784b1a3a15fb2648f?d=identicon)[exeweb](/maintainers/exeweb)

---

Top Contributors

[![exewen](https://avatars.githubusercontent.com/u/22954029?v=4)](https://github.com/exewen "exewen (17 commits)")

---

Tags

phpnacosexewen

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hyperf/nacos

Nacos SDK

22487.9k10](/packages/hyperf-nacos)

PHPackages © 2026

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