PHPackages                             jinexus-framework/jinexus-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. [Framework](/categories/framework)
4. /
5. jinexus-framework/jinexus-config

ActiveComponent[Framework](/categories/framework)

jinexus-framework/jinexus-config
================================

Config component from JiNexus Framework

1.0.0(7y ago)1381BSD-3-ClausePHPPHP ^5.6 || ^7.0

Since Dec 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jinexus-framework/jinexus-config)[ Packagist](https://packagist.org/packages/jinexus-framework/jinexus-config)[ Docs](https://github.com/jinexus-framework/jinexus-config)[ RSS](/packages/jinexus-framework-jinexus-config/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)DependenciesVersions (4)Used By (1)

JiNexus Config
==============

[](#jinexus-config)

`JiNexus Config` provides simple, in-memory access to configuration data within an application. It stores configuration as an associative array and exposes it through explicit accessors, magic property access, and reflection-based getters/setters.

It is intentionally small and has **no external dependencies** and **no I/O** — you decide where the configuration data comes from (files, environment, a database, plain arrays) and hand it to a `Config` instance.

- Documentation:
- Issues:

Requirements
------------

[](#requirements)

- PHP `^8.5`

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

[](#installation)

Install via [Composer](https://getcomposer.org/):

```
composer require jinexus-framework/jinexus-config
```

Usage
-----

[](#usage)

### Creating a config

[](#creating-a-config)

```
use JiNexus\Config\Config\Config;
use JiNexus\Config\Config\Factory\ConfigFactory;

// Directly...
$config = new Config();

// ...or via the factory (returns a fresh Config each call).
$config = ConfigFactory::build();
```

### Reading and writing values

[](#reading-and-writing-values)

```
// Set values (fluent — set() returns the Config instance).
$config->set('host', 'localhost')
       ->set('port', 8080);

// Get a value with an optional default when the key is absent.
$config->get('host');              // 'localhost'
$config->get('timeout');           // null
$config->get('timeout', 30);       // 30

// Check for presence (uses array_key_exists, so a key set to null still "has").
$config->has('host');              // true
$config->set('debug', null);
$config->has('debug');             // true
```

### Magic property access

[](#magic-property-access)

`__get` and `__set` forward to `get()` and `set()`, so you can treat config keys like properties:

```
$config->timezone = 'UTC';   // same as $config->set('timezone', 'UTC')
$config->timezone;           // 'UTC' — same as $config->get('timezone')
$config->missing;            // null
```

### Bulk access

[](#bulk-access)

```
$config->setConfig(['a' => 1, 'b' => 2]); // replace the entire store
$config->getConfig();                      // ['a' => 1, 'b' => 2]
$config->setConfig();                      // reset to []
```

### Error handling

[](#error-handling)

Package-level failures throw `JiNexus\Config\ConfigException` (a subclass of `\Exception`). For example, calling an unsupported magic getter/setter resolved through `AbstractBase::__call` throws a `ConfigException` with a `Not implemented: …` message.

Extending
---------

[](#extending)

`Config` is a deliberately empty subclass of `AbstractConfig`. Keep it that way — do not declare real properties for individual config keys, because a declared property shadows the `__get`/`__set` magic and stops that key from flowing into the internal store. If you want IDE autocompletion for known keys, add `@property` PHPDoc tags to the class docblock rather than real properties.

Testing
-------

[](#testing)

```
composer install
./vendor/bin/phpunit
```

`phpunit.dist.xml` is the committed configuration. Use `XDEBUG_MODE=off` to silence the local Xdebug notice, and `--testdox` for readable output:

```
XDEBUG_MODE=off ./vendor/bin/phpunit --testdox
```

Contributing
------------

[](#contributing)

Please see [CONDUCT.md](CONDUCT.md) for the code of conduct. Contributions should include tests and a `CHANGELOG.md` entry. See [AGENTS.md](AGENTS.md) for detailed build, style, and workflow conventions.

License
-------

[](#license)

BSD-3-Clause. See [LICENSE.md](LICENSE.md).

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

2804d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6903966?v=4)[Jimvirle Calago](/maintainers/JiNexus)[@JiNexus](https://github.com/JiNexus)

---

Top Contributors

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

---

Tags

configjinexus

### Embed Badge

![Health badge](/badges/jinexus-framework-jinexus-config/health.svg)

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

###  Alternatives

[wecodemore/wpstarter

Composer plugin to easily build WordPress websites entirely managed via Composer.

254212.3k11](/packages/wecodemore-wpstarter)[yiisoft/config

Composer plugin and a library for config assembling

34431.3k47](/packages/yiisoft-config)[utopia-php/config

A simple Config library to managing application config variables

15336.4k10](/packages/utopia-php-config)[davidepastore/slim-config

A slim middleware to read configuration from different files based on hassankhan/config

359.3k1](/packages/davidepastore-slim-config)

PHPackages © 2026

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