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(9mo ago)0380↓100%1MITPHPPHP ^8.1CI passing

Since Apr 18Pushed 9mo 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 today

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

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.

---

✨ 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 FastForward\Config\{config, configDir, configCache};
use Symfony\Component\Cache\Simple\FilesystemCache;

$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)

```
$cache = new FilesystemCache();

$config = configCache(
    cache: $cache,
    ['foo' => 'bar']
);

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

---

### Load from a recursive directory:

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

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

---

### Use Laminas-style providers:

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

```
$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 $dir, bool $recursive = false, ?string $cache = null): ConfigInterface`
- `configProvider(iterable $providers, ?string $cache = null): ConfigInterface`

---

🛡 License
---------

[](#-license)

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

###  Health Score

36

—

LowBetter than 83% of packages

Maintenance57

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Recently: every ~13 days

Total

9

Last Release

284d 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 (19 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

[illuminate/contracts

The Illuminate Contracts package.

703120.6M8.5k](/packages/illuminate-contracts)[civicrm/civicrm-core

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

718267.0k10](/packages/civicrm-civicrm-core)[patchlevel/event-sourcing

A lightweight but also all-inclusive event sourcing library with a focus on developer experience

198256.8k5](/packages/patchlevel-event-sourcing)[heptacom/heptaconnect-portal-base

HEPTAconnect base dataset that every other portal is based on

1024.7k9](/packages/heptacom-heptaconnect-portal-base)[llm/mcp-server

PHP SDK for building MCP servers

421.0k](/packages/llm-mcp-server)

PHPackages © 2026

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