PHPackages                             nir/circuit-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. nir/circuit-breaker

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

nir/circuit-breaker
===================

17.6kPHP

Since Oct 25Pushed 8y agoCompare

[ Source](https://github.com/NiR-/CircuitBreaker)[ Packagist](https://packagist.org/packages/nir/circuit-breaker)[ RSS](/packages/nir-circuit-breaker/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

`nir/circuit-breaker`
=====================

[](#nircircuit-breaker)

[![Build Status](https://camo.githubusercontent.com/9c76a10030ee2d0cecfd5fa6ac666a5501e8f8285748d1014d8e0f2258728a2d/68747470733a2f2f7472617669732d63692e6f72672f4e69522d2f43697263756974427265616b65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/NiR-/CircuitBreaker)[![StyleCI](https://camo.githubusercontent.com/23bdc241901e9ddb71788cec8600d05b2c3df395b4f27fa7cca76d98c1e97202/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130383238303737302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/108280770)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/31373faf75d515cdfe8a99e19aabdafa6050343ec70c431aa7db6d8290ad9c29/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4e69522d2f43697263756974427265616b65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/NiR-/CircuitBreaker/?branch=master)

This package is inspired by [`ejsmont-artur/php-circuit-breaker`](https://github.com/ejsmont-artur/php-circuit-breaker).

Install
-------

[](#install)

`composer require nir/circuit-breaker`

How to use?
-----------

[](#how-to-use)

You need to write (or generate) decorator classes to wrap objects on which you want to apply the circuit breaker.

How it works?
-------------

[](#how-it-works)

You can check [this proposal](http://artur.ejsmont.org/blog/circuit-breaker) for Zend framework if you want to know how it works.

Contribute
----------

[](#contribute)

Here are some useful composer scripts you might want to use to ease development:

```
composer run docker:build   # It's automatically run by other scripts
composer run docker:install # Run composer install in a container
composer run docker:tests   # Run phpspec and phpunit in a container
composer run tests          # Run phpspec and phpunit
$(composer run docker:run)  # Run an interactive shell in a new container (composer run docker:build should be called first)
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3843278fdd1e5baafa0a935118386d1d30d94bc0f8fff5fcbec4154c7034651?d=identicon)[NiR-](/maintainers/NiR-)

### Embed Badge

![Health badge](/badges/nir-circuit-breaker/health.svg)

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

###  Alternatives

[cleaniquecoders/shrinkr

Shrinkr is a Laravel package for shortening URLs, with custom slugs, analytics, branded domains, and seamless API integration.

142.9k](/packages/cleaniquecoders-shrinkr)

PHPackages © 2026

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