PHPackages                             uiosun/global-config - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. uiosun/global-config

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

uiosun/global-config
====================

Support config set / get and other functional. (only php7.2 now.)

00PHP

Since Jul 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Sun-FreePort/global-config)[ Packagist](https://packagist.org/packages/uiosun/global-config)[ RSS](/packages/uiosun-global-config/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

global-config
=============

[](#global-config)

使用指南
----

[](#使用指南)

本包旨在提供基础配置与缓存功能。

服务以单例对象 GlobalConfig 提供。通过 `src/Support/Facades/GlobalConfig.php` 可以直接获得本包支持的接口。

在包安装后：

- 初始化命令为 `php artisan global-config:init`。

扩展指南
----

[](#扩展指南)

### 缓存

[](#缓存)

目前支持 Redis 缓存扩展；

如果你需要定义自己的缓存扩展，请在 `src/Cache/` 目录下建立 `*Cache.php` 文件，并遵循 `GlobalConfigCacheInterface` 接口。

如有疑问，可以参考作为 Redis 驱动的 `RedisCache` 和加载驱动的 `GlobalConfigCacheManager`。

### 自动化测试

[](#自动化测试)

本包采用 `orchestra/testbench` 作为模拟 Laravel 的测试工具，开发时无需引入实际项目。

测试文件请继承 `TestBase`，作为自定义父类。

自动化测试所需配置与 Laravel 框架内测试近似，区别与功能可参考：[Testbench Document](https://packages.tools/testbench/getting-started/introduction.html)。

### 版本设定

[](#版本设定)

包版本对应框架版本^1.06.xPs：请避免在生产项目使用 `dev-master` 版本，其将自动指向最新版本。

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

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/2ab7e1912d52129495e37c056de3f8ec95c91174ee107954d4777a7eb8acf239?d=identicon)[UioSun](/maintainers/UioSun)

### Embed Badge

![Health badge](/badges/uiosun-global-config/health.svg)

```
[![Health](https://phpackages.com/badges/uiosun-global-config/health.svg)](https://phpackages.com/packages/uiosun-global-config)
```

PHPackages © 2026

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