PHPackages                             degraciamathieu/php-easy-breaker - 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. degraciamathieu/php-easy-breaker

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

degraciamathieu/php-easy-breaker
================================

PHP implementation of circuit breaker pattern.

v1.0.1(6y ago)3321MITPHPPHP ^7.4CI failing

Since Dec 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/DeGraciaMathieu/php-easy-breaker)[ Packagist](https://packagist.org/packages/degraciamathieu/php-easy-breaker)[ Docs](https://github.com/DeGraciaMathieu/php-easy-breaker)[ RSS](/packages/degraciamathieu-php-easy-breaker/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/df851b5ed8fcf10c785905d8ab632515bda4f402fb2224eb0be2675253a62370/68747470733a2f2f7472617669732d63692e6f72672f44654772616369614d6174686965752f7068702d656173792d627265616b65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DeGraciaMathieu/php-easy-breaker)[![Code Coverage](https://camo.githubusercontent.com/380b05a4435845a703edca8a7ba0361d90c96cfc48a55b1304feb674a88d2d6e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44654772616369614d6174686965752f7068702d656173792d627265616b65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/DeGraciaMathieu/php-easy-breaker/?branch=master)[![PHP range](https://camo.githubusercontent.com/ac79ee14f383cc6c127efd83a9e5f7f31fa465c66af80580dd4f310dfe18e563/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d762f44654772616369614d6174686965752f7068702d656173792d627265616b65722e737667)](https://camo.githubusercontent.com/ac79ee14f383cc6c127efd83a9e5f7f31fa465c66af80580dd4f310dfe18e563/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d762f44654772616369614d6174686965752f7068702d656173792d627265616b65722e737667)[![Latest Version on Packagist](https://camo.githubusercontent.com/08610bafd991a0acdbdad7cad017334b7d968bae64164ab163c7528b0953b32b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656772616369616d6174686965752f7068702d656173792d627265616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/degraciamathieu/php-easy-breaker)[![](https://camo.githubusercontent.com/aa6a435263a3eb56f2e23ce21e665ba3147131fbb827a28a9233c71090308f31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656772616369616d6174686965752f7068702d656173792d627265616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/degraciamathieu/php-easy-breaker)

degraciamathieu/php-easy-breaker
================================

[](#degraciamathieuphp-easy-breaker)

PHP implementation of circuit breaker pattern.

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

[](#installation)

Run in console below command to download package to your project:

```
composer require degraciamathieu/php-easy-breaker

```

usage
-----

[](#usage)

```
require __DIR__.'/vendor/autoload.php';

use Exception;
use DeGraciaMathieu\EasyBreaker\Breaker;
use DeGraciaMathieu\EasyBreaker\CircuitBreaker;

$firstBreaker = (new Breaker)
    ->when(Exception::class)
    ->do(function(Exception $e){
        return "it's broken.";
    });

$secondBreaker = (new Breaker)
    ->when(Exception::class)
    ->do(function(Exception $e){
        return "really broken.";
    });

$thirdBreaker = (new Breaker)
    ->when(AnotherException::class)
    ->do(function(AnotherException $e){
        return "boom.";
    });

$results = (new CircuitBreaker())
    ->addBreaker($firstBreaker)
    ->addBreaker($secondBreaker)
    ->addBreaker($thirdBreaker)
    ->closure(function(){
        throw new Exception();
    });

var_dump($results);

// array(2) {
//   [0]=>
//   string(12) "it's broken."
//   [1]=>
//   string(18) "really broken."
// }
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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

2

Last Release

2391d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11473997?v=4)[DeGraciaMathieu](/maintainers/DeGraciaMathieu)[@DeGraciaMathieu](https://github.com/DeGraciaMathieu)

---

Top Contributors

[![DeGraciaMathieu](https://avatars.githubusercontent.com/u/11473997?v=4)](https://github.com/DeGraciaMathieu "DeGraciaMathieu (11 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")

---

Tags

circuit-breakerpatternphpphp7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/degraciamathieu-php-easy-breaker/health.svg)

```
[![Health](https://phpackages.com/badges/degraciamathieu-php-easy-breaker/health.svg)](https://phpackages.com/packages/degraciamathieu-php-easy-breaker)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M277](/packages/illuminate-pipeline)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)[illuminate/redis

The Illuminate Redis package.

8314.6M369](/packages/illuminate-redis)

PHPackages © 2026

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