PHPackages                             kaiseki/wp-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. kaiseki/wp-config

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

kaiseki/wp-config
=================

Type-safe access to array configurations

2.0.0(1mo ago)0338[3 PRs](https://github.com/kaisekidev/kaiseki-wp-config/pulls)4MITPHPPHP ^8.2CI passing

Since Feb 5Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/kaisekidev/kaiseki-wp-config)[ Packagist](https://packagist.org/packages/kaiseki/wp-config)[ Docs](https://github.com/kaisekidev/kaiseki-wp-config)[ RSS](/packages/kaiseki-wp-config/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (23)Versions (10)Used By (4)

kaiseki/wp-config
=================

[](#kaisekiwp-config)

Type-safe access to array configurations.

Wrap a config array (or pull one from a PSR-11 container) and read values with typed accessors that throw on a missing key or a wrong type — so a typo or a misconfigured value fails loudly instead of silently returning `null`.

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

[](#installation)

```
composer require kaiseki/wp-config
```

Requires PHP 8.2 or newer.

Usage
-----

[](#usage)

```
use Kaiseki\WordPress\Config\NestedArrayConfig;

$config = new NestedArrayConfig([
    'db' => [
        'host' => 'localhost',
        'port' => 3306,
    ],
]);

$config->string('db/host'); // "localhost"
$config->int('db/port');    // 3306
$config->has('db/user');    // false
```

Paths are slash-separated. The typed getters (`string()`, `int()`, `float()`, `bool()`, `array()`) throw `UnknownKeyException` if the path is missing and `InvalidValueException` if the value is not of the expected type. `has()` reports whether a path resolves.

### From a PSR-11 container

[](#from-a-psr-11-container)

`Config::get()` resolves the `ConfigInterface` service from a container:

```
use Kaiseki\WordPress\Config\Config;

$config = Config::get($container); // expects ConfigInterface::class in the container
```

`ConfigProvider` wires that up for laminas-style config aggregators: it aliases `ConfigInterface`to `NestedArrayConfig` and registers a factory that builds the config from the container's `config`entry.

`Config::initClassMap()` resolves a map of keys to class instances from the container:

```
$map = Config::initClassMap($container, ['logger' => LoggerInterface::class]);
// ['logger' => ]
```

Development
-----------

[](#development)

```
composer install
composer check   # check-deps, cs-check, phpstan, phpunit
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Total

4

Last Release

32d ago

Major Versions

1.0.2 → 2.0.02026-05-31

PHP version history (2 changes)1.0.0PHP ^7.4

2.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kaiseki-wp-config/health.svg)

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

###  Alternatives

[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k455.6M9.5k](/packages/symfony-dependency-injection)[illuminate/contracts

The Illuminate Contracts package.

706130.3M13.2k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31182.0M2.3k](/packages/illuminate-container)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k49](/packages/ecotone-ecotone)[symfony/type-info

Extracts PHP types information.

20069.8M267](/packages/symfony-type-info)

PHPackages © 2026

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