PHPackages                             flaviovs/uconfig - 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. flaviovs/uconfig

ActiveLibrary

flaviovs/uconfig
================

A micro, no frills, configuration interface for PHP

0.0.1(10y ago)021MITPHP

Since Mar 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/flaviovs/uconfig)[ Packagist](https://packagist.org/packages/flaviovs/uconfig)[ RSS](/packages/flaviovs-uconfig/feed)WikiDiscussions master Synced today

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

A micro configuration interface for PHP
=======================================

[](#a-micro-configuration-interface-for-php)

Usage:

```
$handler = new \UConfig\INIFileHandler('/path/to/config.ini');
$defaults = [
    'section' => [
        'bar' => 1,
        'zoo' => 2,
    ],
];
$config = new \UConfig\Config($defaults);
$config->addHandler(new \UConfig\INIFileHandler('/path/to/config.ini'));

$bar = $config->get('section', 'bar');
// $bar = 1

try {
    $config->get('nonexistent', 'bar');
} catch ( \UConfig\SectionNotFoundException $ex ) {
    die("Section not found: " . $ex->getMessage());
} catch ( \UConfig\OptionNotFoundException $ex ) {
    die("Option not found: " . $ex->getMessage());
}

```

Handlers
--------

[](#handlers)

Configuration is handled by *configuration handlers*. To implement a new handler, add a class that implements the `UConfig\Handler`interface, with a method called `load()` that returns a configuration array, which must be structured as follows:

```
 $config = [
     'section' => [
         'key1' => value,
         'key2' => value,
         //(...)
     ],
     'anothersection' => [
         'key1' => value,
         'key2' => value,
         //(...)
    ]
]

```

A `UConfig\Config` object may have many handlers attached to it. Use the `addHandler()` method to add handlers. Configuration is loaded in sequence, with later handler overriding previous ones.

Currently, only the `UConfig\INIFileHandler` is provided. Other handlers may be added in the future.

###  Health Score

24

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

3659d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c4f7729440b3a6349f7aaed372ad81ac4746b1c5b801abd644158daad410926e?d=identicon)[flaviovs](/maintainers/flaviovs)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flaviovs-uconfig/health.svg)

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

PHPackages © 2026

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