PHPackages                             huangdijia/hyperf-config-array - 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. huangdijia/hyperf-config-array

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

huangdijia/hyperf-config-array
==============================

Config extension for Hyperf.

0.1.1(5y ago)234MITPHPPHP &gt;=7.2

Since Nov 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/huangdijia/hyperf-config-array)[ Packagist](https://packagist.org/packages/huangdijia/hyperf-config-array)[ RSS](/packages/huangdijia-hyperf-config-array/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (13)Versions (3)Used By (0)

Hyperf config-array
===================

[](#hyperf-config-array)

[![Latest Test](https://github.com/huangdijia/hyperf-config-array/workflows/tests/badge.svg)](https://github.com/huangdijia/hyperf-config-array/actions)[![Latest Stable Version](https://camo.githubusercontent.com/454cb3b0141425cba2ec1c5f78e5c8de16f2f49bda1889fb9d238160e0423bd9/68747470733a2f2f706f7365722e707567782e6f72672f6875616e6764696a69612f6879706572662d636f6e6669672d61727261792f76657273696f6e2e706e67)](https://packagist.org/packages/huangdijia/hyperf-config-array)[![Total Downloads](https://camo.githubusercontent.com/f60945bc390d38a8710ae584fd774e166f0862dc0da5cba81d21294d4810b3b8/68747470733a2f2f706f7365722e707567782e6f72672f6875616e6764696a69612f6879706572662d636f6e6669672d61727261792f642f746f74616c2e706e67)](https://packagist.org/packages/huangdijia/hyperf-config-array)[![GitHub license](https://camo.githubusercontent.com/b274fff988cf1f4270750f83eab73f61e3ce86f40b6147a51ca0973bf7544e8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6875616e6764696a69612f6879706572662d636f6e6669672d6172726179)](https://github.com/huangdijia/hyperf-config-array)

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

[](#installation)

```
composer require huangdijia/hyperf-config-array

```

Publish
-------

[](#publish)

```
php bin/hyperf.php vendor:publish huangdijia/hyperf-config-array
```

Define source
-------------

[](#define-source)

```
namespace App\Source;

use Huangdijia\ConfigArray\SourceInterface;
use Hyperf\DB\DB;

class DBSource implements SourceInterface
{
    public function toArray(): array
    {
        return DB::query('SELECT * FROM `config`;');
    }
}
```

Set config
----------

[](#set-config)

```
// config/autoload/config_array.php
return [
    // ...
    'source' => App\Source\DBSource::class,
    // ...
    'mapping' => 'setting', // using as config('setting')
    // or
    'mapping' => [
        'setting_key' => 'setting.key', // using as config('setting.key')
    ],
];
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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

Total

2

Last Release

2000d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8337659?v=4)[Deeka Wong](/maintainers/huangdijia)[@huangdijia](https://github.com/huangdijia)

---

Top Contributors

[![huangdijia](https://avatars.githubusercontent.com/u/8337659?v=4)](https://github.com/huangdijia "huangdijia (10 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/huangdijia-hyperf-config-array/health.svg)

```
[![Health](https://phpackages.com/badges/huangdijia-hyperf-config-array/health.svg)](https://phpackages.com/packages/huangdijia-hyperf-config-array)
```

###  Alternatives

[hyperf/swoole-tracker

A swoole tracker library for Hyperf.

1720.3k](/packages/hyperf-swoole-tracker)

PHPackages © 2026

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