PHPackages                             bitsbeats/softfailer - 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. bitsbeats/softfailer

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

bitsbeats/softfailer
====================

Library to suppress errors unless they exceed a certain threshold within a given time interval

v1.0.1(6y ago)19Apache-2.0PHPPHP &gt;=7.2

Since Aug 15Pushed 6y ago2 watchersCompare

[ Source](https://github.com/bitsbeats/php-softfailer)[ Packagist](https://packagist.org/packages/bitsbeats/softfailer)[ RSS](/packages/bitsbeats-softfailer/feed)WikiDiscussions master Synced 2w ago

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

bitsbeats/php-softfailer
========================

[](#bitsbeatsphp-softfailer)

PHP library to suppress errors ("soft failures") unless they exceed a certain threshold within a given time interval.

Features
--------

[](#features)

- uses persistent storage, so that failures are counted among independent script calls or pageviews
- storage drivers for filesystem, memcache and APCu

Install
-------

[](#install)

The easiest way to install SoftFailer is by using [composer](https://getcomposer.org/):

```
$> composer require bitsbeats/softfailer

```

Usage
-----

[](#usage)

```
$storage = new Filesystem('/tmp/softfail.txt', 500);

// hard fail if 3 or more "soft fails" occur within a 3600 second time window
$sf = new SoftFailer($storage, 3, 3600);

try {
    $sf->recordFailure(new DateTime());
}
catch (HardFailLimitReachedException $e) {
    // a "hard fail" is triggered by throwing a "HardFailLimitReachedException" exception
    print "FAIL: {$e->getMessage()}\n";
    $sf->clearFailPoints();
    exit(1);
}
```

See `example.php` for the full example.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

2512d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44491622?v=4)[Thomann Bits &amp; Beats](/maintainers/bitsbeats)[@bitsbeats](https://github.com/bitsbeats)

---

Top Contributors

[![snstamml-tio](https://avatars.githubusercontent.com/u/2751270?v=4)](https://github.com/snstamml-tio "snstamml-tio (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bitsbeats-softfailer/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M719](/packages/sylius-sylius)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M61](/packages/knuckleswtf-scribe)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k45](/packages/friendsoftypo3-content-blocks)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M534](/packages/shopware-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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