PHPackages                             fast-forward/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fast-forward/config

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

fast-forward/config
===================

Fast Forward Config utility classes

v1.4.0(1y ago)01.0k3MITPHPPHP ^8.1CI passing

Since Apr 18Pushed 2mo agoCompare

[ Source](https://github.com/php-fast-forward/config)[ Packagist](https://packagist.org/packages/fast-forward/config)[ Docs](https://github.com/php-fast-forward)[ RSS](/packages/fast-forward-config/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (9)Dependencies (7)Versions (10)Used By (3)

FastForward Config
==================

[](#fastforward-config)

**FastForward Config** is a flexible and modern PHP configuration library built for performance, extendability, and lazy-loading behavior. It supports dot-notation keys, recursive directory loading, Laminas-compliant configuration providers, and optional PSR-16 caching.

[![PHP Version](https://camo.githubusercontent.com/c9b19f1cbf8aefb8c278c8b5d392b64401164a08fced6ccbf376b32135d6714f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/releases/)[![Composer Package](https://camo.githubusercontent.com/fefef0f53fa712a5146b30ee3abaf7144410ef40c9574e9c6ee171da66405ad4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d666173742d2d666f7277617264253246636f6e6669672d4632384431412e7376673f6c6f676f3d636f6d706f736572266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/fast-forward/config)[![Tests](https://camo.githubusercontent.com/a3d6a5becfc7570f545cede8110765f8fd53585b4ecb4b9a9fcf10fa0397fdc3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d666173742d666f72776172642f636f6e6669672f74657374732e796d6c3f6c6f676f3d676974687562616374696f6e73266c6f676f436f6c6f723d7768697465266c6162656c3d746573747326636f6c6f723d323243353545)](https://github.com/php-fast-forward/config/actions/workflows/tests.yml)[![Coverage](https://camo.githubusercontent.com/783041b70aa9cfca2a0969ddc49e11178a3367b14165ef787853fdc3075f43b3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d706870756e69742d3441444538303f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php-fast-forward.github.io/config/coverage/index.html)[![Docs](https://camo.githubusercontent.com/61d34e21a795dc628c76ab98d9ed4ff3cd31d075073aabbd48fb7e39232b6ed3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6465706c6f796d656e74732f7068702d666173742d666f72776172642f636f6e6669672f6769746875622d70616765733f6c6f676f3d72656164746865646f6373266c6f676f436f6c6f723d7768697465266c6162656c3d646f6373266c6162656c436f6c6f723d31453239334226636f6c6f723d333842444638267374796c653d666c6174)](https://php-fast-forward.github.io/config/index.html)[![License](https://camo.githubusercontent.com/dc4735cf260a92ba023e2a3467864ee972fa54b7d3deefa33711b194731875a7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7068702d666173742d666f72776172642f636f6e6669673f636f6c6f723d363437343842)](LICENSE)[![GitHub Sponsors](https://camo.githubusercontent.com/d61f432861a7c60e0a9620738dffd3b884bcf392c86e48a2cc87ea57a077e90a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73706f6e736f72732f7068702d666173742d666f72776172643f6c6f676f3d67697468756273706f6e736f7273266c6f676f436f6c6f723d776869746526636f6c6f723d454334383939)](https://github.com/sponsors/php-fast-forward)

---

✨ Features
----------

[](#-features)

- 🔑 Dot notation access: `$config->get('app.env')`
- 📁 Load from arrays, directories, or providers
- ♻️ Lazy-loading with `__invoke()`
- 🧩 Aggregation of multiple sources
- 🗂 Recursive directory support
- 💾 Optional PSR-16 compatible caching
- 🔌 Compatible with Laminas ConfigProviders

---

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

[](#-installation)

```
composer require fast-forward/config
```

---

🚀 Quick Start
-------------

[](#-quick-start)

### Load configuration from multiple sources

[](#load-configuration-from-multiple-sources)

```
use function FastForward\Config\config;

$config = config(
    ['app' => ['env' => 'production']],
    __DIR__ . '/config',
    \Vendor\Package\ConfigProvider::class
);

echo $config->get('app.env'); // "production"
```

---

### Cache configuration using PSR-16

[](#cache-configuration-using-psr-16)

```
use function FastForward\Config\configCache;

/** @var \Psr\SimpleCache\CacheInterface $cache */
$config = configCache($cache, ['foo' => 'bar']);

echo $config->get('foo'); // "bar"
```

---

### Load from a recursive directory

[](#load-from-a-recursive-directory)

```
use function FastForward\Config\configDir;

$config = configDir(__DIR__ . '/config', recursive: true);
```

---

### Use Laminas-style providers

[](#use-laminas-style-providers)

```
use function FastForward\Config\configProvider;

$config = configProvider([
    new Vendor\Package\Provider1(),
    new Vendor\Package\Provider2(),
]);
```

---

🧪 Access &amp; Mutation
-----------------------

[](#-access--mutation)

```
$config->set('db.host', 'localhost');
echo $config->get('db.host'); // "localhost"

$config->has('app.debug'); // true/false

print_r($config->toArray());
```

---

📁 Directory Structure Example
-----------------------------

[](#-directory-structure-example)

```
config/
├── app.php
├── db.php
└── services/
    └── mail.php

```

---

🧰 API Summary
-------------

[](#-api-summary)

- `config(...$configs): ConfigInterface`
- `configCache(CacheInterface $cache, ...$configs): ConfigInterface`
- `configDir(string $rootDirectory, bool $recursive = false, ?string $cachedConfigFile = null): ConfigInterface`
- `configProvider(iterable $providers, ?string $cachedConfigFile = null): ConfigInterface`

---

🛡 License
---------

[](#-license)

MIT © 2025 [Felipe Sayão Lobato Abreu](https://github.com/mentordosnerds)

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance69

Regular maintenance activity

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.5% 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 ~6 days

Recently: every ~13 days

Total

9

Last Release

377d ago

### Community

Maintainers

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

---

Top Contributors

[![coisa](https://avatars.githubusercontent.com/u/426835?v=4)](https://github.com/coisa "coisa (29 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

configconfigurationphpphp-configphp-library

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[illuminate/contracts

The Illuminate Contracts package.

706127.7M12.5k](/packages/illuminate-contracts)[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k447.1M9.0k](/packages/symfony-dependency-injection)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k35](/packages/civicrm-civicrm-core)[moonshine/moonshine

Laravel administration panel

1.3k239.9k75](/packages/moonshine-moonshine)

PHPackages © 2026

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