PHPackages                             waffle-commons/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. waffle-commons/config

ActiveLibrary[Framework](/categories/framework)

waffle-commons/config
=====================

Config component for Waffle framework.

0.1.0-alpha4(4mo ago)03[4 PRs](https://github.com/waffle-commons/config/pulls)1MITPHPPHP ^8.5CI passing

Since Dec 16Pushed 1mo agoCompare

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

READMEChangelog (2)Dependencies (5)Versions (13)Used By (1)

[![PHP Version Require](https://camo.githubusercontent.com/c1772585212ac845514159ec9166ca75b59952b95164b03723b64b1a518e10f1/687474703a2f2f706f7365722e707567782e6f72672f776166666c652d636f6d6d6f6e732f636f6e6669672f726571756972652f706870)](https://packagist.org/packages/waffle-commons/config)[![PHP CI](https://github.com/waffle-commons/config/actions/workflows/main.yml/badge.svg)](https://github.com/waffle-commons/config/actions/workflows/main.yml)[![codecov](https://camo.githubusercontent.com/9414400cac48e19720dd3c6907b736d1bcc1b4b0987df119757b555379b63393/68747470733a2f2f636f6465636f762e696f2f67682f776166666c652d636f6d6d6f6e732f636f6e6669672f67726170682f62616467652e7376673f746f6b656e3d64373461633632612d373837322d343033352d386238622d626363336166313939316530)](https://codecov.io/gh/waffle-commons/config)[![Latest Stable Version](https://camo.githubusercontent.com/9812234abd2bdbcb4698952fe9a9751878ec96d1a023106c2de61a42dc2a09b8/687474703a2f2f706f7365722e707567782e6f72672f776166666c652d636f6d6d6f6e732f636f6e6669672f76)](https://packagist.org/packages/waffle-commons/config)[![Latest Unstable Version](https://camo.githubusercontent.com/4d1880dd0ed0448c768a0990db9723a776ae0ae618a3c05366817da51e3213dd/687474703a2f2f706f7365722e707567782e6f72672f776166666c652d636f6d6d6f6e732f636f6e6669672f762f756e737461626c65)](https://packagist.org/packages/waffle-commons/config)[![Total Downloads](https://camo.githubusercontent.com/a7c5b78ec6868c602d29ab57c9371f79416b672dbba2befd79b6085196d1a177/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776166666c652d636f6d6d6f6e732f636f6e6669672e737667)](https://packagist.org/packages/waffle-commons/config)[![Packagist License](https://camo.githubusercontent.com/6818d6d869aed1c34003158505e83948b134d0a10bdea43491e354f249808b64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f776166666c652d636f6d6d6f6e732f636f6e666967)](https://github.com/waffle-commons/config/blob/main/LICENSE.md)

Waffle Config Component
=======================

[](#waffle-config-component)

A robust configuration management library for PHP, supporting YAML files and environment variable substitution.

📦 Installation
--------------

[](#-installation)

```
composer require waffle-commons/config
```

🚀 Usage
-------

[](#-usage)

### Basic Usage

[](#basic-usage)

```
use Waffle\Commons\Config\Config;

// Initialize Config with the path to your configuration directory and current environment
$config = new Config('/path/to/config/dir', 'prod');

// Retrieve a string value
$dbHost = $config->getString('database.host');

// Retrieve an integer with a default value
$port = $config->getInt('database.port', 3306);

// Retrieve a boolean
$debug = $config->getBool('app.debug', false);
```

### Environment Variables

[](#environment-variables)

You can reference environment variables in your YAML files using the `%env(VAR_NAME)%` syntax:

```
# config/app.yaml
database:
  host: '%env(DB_HOST)%'
  password: '%env(DB_PASSWORD)%'
```

### Environment Specifics

[](#environment-specifics)

The loader automatically merges `app.yaml` with `app_{env}.yaml`. For example, if your environment is `prod`, it will load `app.yaml` and then override values with `app_prod.yaml`.

Testing
-------

[](#testing)

To run the tests, use the following command:

```
composer tests
```

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

[](#contributing)

Contributions are welcome! Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for details.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE.md](./LICENSE.md) file for details.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance84

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

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

Total

2

Last Release

133d ago

PHP version history (2 changes)0.1.0-alpha3PHP ^8.4

0.1.0-alpha4PHP ^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/34a7557a3fb23aaf788ca3892b9b7efdf96e753264bafd0599153c9e8a921316?d=identicon)[LesliePetrimaux](/maintainers/LesliePetrimaux)

---

Top Contributors

[![supa-chayajin](https://avatars.githubusercontent.com/u/695448?v=4)](https://github.com/supa-chayajin "supa-chayajin (23 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91245.3M590](/packages/laravel-pail)

PHPackages © 2026

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