PHPackages                             ksaveras/guzzle-circuit-breaker-middleware - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. ksaveras/guzzle-circuit-breaker-middleware

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ksaveras/guzzle-circuit-breaker-middleware
==========================================

1.0.1(2y ago)372MITPHPPHP ^8.1

Since May 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ksaveras/guzzle-circuit-breaker-middleware)[ Packagist](https://packagist.org/packages/ksaveras/guzzle-circuit-breaker-middleware)[ RSS](/packages/ksaveras-guzzle-circuit-breaker-middleware/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

Guzzle Circuit Breaker Middleware
=================================

[](#guzzle-circuit-breaker-middleware)

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

[](#installation)

```
composer require ksaveras/guzzle-circuit-breaker-middleware

```

Use
---

[](#use)

It's recommended to use CB (Circuit Breaker) Middleware on top of the stack, but after the cache middleware if you use any. This allows to utilize the cache layer and fail fast when the service is not available.

```
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use Ksaveras\GuzzleCircuitBreakerMiddleware\CircuitBreakerMiddleware;

// $factory is instance of CircuitBreakerFactory
$middleware = new CircuitBreakerMiddleware($factory->create('CB Name'));

$handlerStack = HandlerStack::create();
$handlerStack->push($middleware);

$client = new Client(['handler' => $handlerStack]);
```

Tests
-----

[](#tests)

```
composer test

```

Code quality
------------

[](#code-quality)

```
composer static-analysis

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

3

Last Release

1052d ago

Major Versions

v0.1.0 → 1.0.02023-06-24

PHP version history (2 changes)v0.1.0PHP ^7.4|^8.0

1.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/654934f82b6b26fb089607ff8b3fd69837706fe81ae8355c97923f09f2c66741?d=identicon)[ksaveras](/maintainers/ksaveras)

---

Top Contributors

[![ksaveras](https://avatars.githubusercontent.com/u/485111?v=4)](https://github.com/ksaveras "ksaveras (11 commits)")[![release-automaton[bot]](https://avatars.githubusercontent.com/in/341347?v=4)](https://github.com/release-automaton[bot] "release-automaton[bot] (2 commits)")

---

Tags

middlewareGuzzleerror handlingmicroservicescircuit breakerfault tolerancegraceful

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ksaveras-guzzle-circuit-breaker-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/ksaveras-guzzle-circuit-breaker-middleware/health.svg)](https://phpackages.com/packages/ksaveras-guzzle-circuit-breaker-middleware)
```

###  Alternatives

[ackintosh/ganesha

PHP implementation of Circuit Breaker pattern

6613.9M13](/packages/ackintosh-ganesha)[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43117.4M104](/packages/kevinrob-guzzle-cache-middleware)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21610.7M64](/packages/caseyamcl-guzzle-retry-middleware)[rtheunissen/guzzle-log-middleware

Guzzle middleware to log requests and responses

842.3M17](/packages/rtheunissen-guzzle-log-middleware)[eljam/guzzle-jwt-middleware

A jwt authentication middleware for guzzle 6

28722.5k3](/packages/eljam-guzzle-jwt-middleware)[rtheunissen/guzzle-rate-limiter

Guzzle 6 middleware used to delay requests dynamically

52177.2k1](/packages/rtheunissen-guzzle-rate-limiter)

PHPackages © 2026

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