PHPackages                             ctorh23/configmanager - 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. ctorh23/configmanager

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

ctorh23/configmanager
=====================

Configuration management library for PHP applications.

v1.0.0(1mo ago)01MITPHPPHP ^8.3CI passing

Since Mar 13Pushed 1mo agoCompare

[ Source](https://github.com/ctorh23/configmanager)[ Packagist](https://packagist.org/packages/ctorh23/configmanager)[ RSS](/packages/ctorh23-configmanager/feed)WikiDiscussions main Synced 1mo ago

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

ConfigManager
=============

[](#configmanager)

**ConfigManager** is a lightweight library for managing PHP configuration files with support for Dot-Notation and Lazy Loading.

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

[](#installation)

The package requires **PHP 8.3** or newer.

```
composer require ctorh23/configmanager
```

Usage
-----

[](#usage)

### Configuration File Structure

[](#configuration-file-structure)

Create a PHP file, for example `app.php`, that looks like this:

```
return [
	'name' => 'My App',
	'env' => $this->env('APP_ENV', 'production'),
	'encryption' => [
		'cipher' => 'AES-256-GCM',
		'key' => $this->env('APP_KEY'),
	],
];
```

The file must return an array. As you can see, you can use environment variables as configuration settings. The second parameter of the `env()` method is a default value.

### Accessing Configuration Values

[](#accessing-configuration-values)

Assuming your configuration files are saved in a `config/` directory, you must pass the path to this directory to instantiate a `ConfigManager` object:

```
use Ctorh23\ConfigManager\ConfigManager;

$confMan = new ConfigManager(__DIR__ . '/config');

echo $confMan->get('app.name'); //Output: My App
echo $confMan->get('app.env'); //Output: production
echo $confMan->get('app.encryption.cipher'); //Output: AES-256-GCM

// Passing a default value as a second parameter
echo $confMan->get('app.logs', 'logs/'); //Output: logs/
```

You can also dynamically set configuration settings, but you should keep in mind that they are not persisted on the filesystem:

```
$confMan->set('timezone', 'UTC');
$confMan->set('app.encryption.cipher', 'AES-XTS');

echo $confMan->get('timezone'); //Output: UTC
echo $confMan->get('app.encryption.cipher'); //Output: AES-XTS
```

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance95

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

57d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/ctorh23-configmanager/health.svg)

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

PHPackages © 2026

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