PHPackages                             cline/cascade - 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. cline/cascade

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

cline/cascade
=============

Multi-source resolution with fallback chains for PHP

2.0.2(2mo ago)00MITPHPPHP ^8.5.0CI passing

Since Mar 4Pushed 2mo agoCompare

[ Source](https://github.com/faustbrian/cascade)[ Packagist](https://packagist.org/packages/cline/cascade)[ RSS](/packages/cline-cascade/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (9)Used By (0)

[![GitHub Workflow Status](https://github.com/faustbrian/cascade/actions/workflows/quality-assurance.yaml/badge.svg)](https://github.com/faustbrian/cascade/actions)[![Latest Version on Packagist](https://camo.githubusercontent.com/2d587f8200dc8c0fa5cef03b05c3c8c3711413e8a416e8791dfef2666848363f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c696e652f636173636164652e737667)](https://packagist.org/packages/cline/cascade)[![Software License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/3ff499d8883dff5bc4da3293413e73c0503e2e9a08f5195fdd1a01d3fc31dcc6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c696e652f636173636164652e737667)](https://packagist.org/packages/cline/cascade)

---

Cascade is a framework-agnostic resolver that fetches values from multiple sources in priority order, returning the first match. Perfect for implementing customer-specific → tenant-specific → platform-default fallback chains.

**Think:** "Get the FedEx credentials for this customer, falling back to platform defaults if they don't have their own."

Requirements
------------

[](#requirements)

> **Requires [PHP 8.4+](https://php.net/releases/)**

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

[](#installation)

```
composer require cline/cascade
```

Documentation
-------------

[](#documentation)

Full documentation is available at **[docs.cline.sh/cascade](https://docs.cline.sh/cascade)**

- **[Getting Started](https://docs.cline.sh/cascade/getting-started)** - Installation and core concepts
- **[Basic Usage](https://docs.cline.sh/cascade/basic-usage)** - Simple examples and patterns
- **[Conductors](https://docs.cline.sh/cascade/conductors)** - Fluent API for building resolution chains
- **[Sources](https://docs.cline.sh/cascade/sources)** - Built-in and custom source types
- **[Named Resolvers](https://docs.cline.sh/cascade/named-resolvers)** - Managing multiple configurations
- **[Events](https://docs.cline.sh/cascade/events)** - Monitoring resolution lifecycle
- **[Cookbook](https://docs.cline.sh/cascade/cookbook)** - Real-world patterns and recipes

Quick Example
-------------

[](#quick-example)

```
use Cline\Cascade\Cascade;
use Cline\Cascade\Source\CallbackSource;

// Build a resolution chain
$cascade = new Cascade();

$cascade->from(new CallbackSource(
    name: 'customer',
    resolver: fn($key, $ctx) => $customerDb->find($ctx['customer_id'], $key),
))
    ->fallbackTo(new CallbackSource(
        name: 'platform',
        resolver: fn($key) => $platformDb->find($key),
    ))
    ->as('credentials');

// Resolve with context
$apiKey = $cascade->using('credentials')
    ->for(['customer_id' => 'cust-123'])
    ->get('fedex-api-key');
// Tries customer source first, falls back to platform if not found
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please use the [GitHub security reporting form](https://github.com/faustbrian/cascade/security) rather than the issue queue.

Credits
-------

[](#credits)

- [Brian Faust](https://github.com/faustbrian)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance88

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

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

Recently: every ~25 days

Total

8

Last Release

61d ago

Major Versions

1.0.3 → 2.0.02026-03-04

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22145591?v=4)[Brian Faust](/maintainers/faustbrian)[@faustbrian](https://github.com/faustbrian)

---

Top Contributors

[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (9 commits)")

---

Tags

phpconfigurationresolvermulti-tenantcredentialsfallbackcascade

### Embed Badge

![Health badge](/badges/cline-cascade/health.svg)

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

PHPackages © 2026

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