PHPackages                             climbx/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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. climbx/config

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

climbx/config
=============

Tools to manage framework config files. Implements PSR-11

1.0.4(4y ago)010MITPHPPHP &gt;=8.0

Since Jul 6Pushed 4y agoCompare

[ Source](https://github.com/climbx/Config)[ Packagist](https://packagist.org/packages/climbx/config)[ RSS](/packages/climbx-config/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

Config
======

[](#config)

Framework config. files manager. Implements PSR-11

Configuration files formats
---------------------------

[](#configuration-files-formats)

This component accepts Yaml and Json files formats.

Full Example
------------

[](#full-example)

With JsonLoader

```
// myConfig.json

{
  "FOO": "BAR"
}
```

```
// PHP Code

use Climbx\Bag\Bag;
use Climbx\Config\Loader\JsonLoader;
use Climbx\Filesystem\FileHelper;
use Climbx\Config\Parser\EnvVarParser;
use Climbx\Config\Reader\Reader;
use Climbx\Config\ConfigContainer;

// Bag with array of .env data

// JsonLoader
$jsonLoader = new JsonLoader(__DIR__ . 'config/', new FileHelper());

// Config files Reader
$env = new Bag(['FOO' => 'BAR']); // loaded from .env file
$reader = new Reader($jsonLoader, new EnvVarParser($env));

// Container
$container = new ConfigContainer($reader);

/*
 * get() method
 *
 * If the config file exists it will be returned
 *
 * If not, a NotFoundException is thrown.
 *
 * If the config file is not valid, a ConfigurationParserException
 * is thrown
 *
 * If a referenced .env var is missing in .env file,
 * a EnvParameterNotFoundException is thrown.
 */
$config = $container->get('myConfigId');

/*
 * has() method.
 *
 * This method returns true if the config exists and is readable,
 * and false otherwise.
 */
$config = $container->has('myConfigId');
```

### Env Vars Parser

[](#env-vars-parser)

It is possible to add a reference to a `.env` var into a configuration var. It is done with the magic expression `$env(MY_ENV_VAR)`. If the reference exists in `.env`, it will be replaced by its value. If not, a EnvParameterNotFoundException will be thrown.

```
# .env file

FOO=BAR
```

```
# config.yaml

BAZ: $env(FOO)
```

```
// PHP Code

$container = new ConfigContainer($reader);

$config = $container->get('config');
echo $config->get('BAZ'); // Will print: BAR
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

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

Total

6

Last Release

1777d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

phpcontainerPSR-11config

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[devanych/di-container

Simple implementation of a PSR-11 dependency injection container

124.2k3](/packages/devanych-di-container)

PHPackages © 2026

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