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 3d 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

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

2465d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/626778c8eb20abbb1c9823ad6c93f9b883161f696004e4eeade5984d1d54ac75?d=identicon)[bitsbeats](/maintainers/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

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)[ldaptools/ldaptools

LdapTools is a feature-rich LDAP library for PHP 5.6+.

204263.9k1](/packages/ldaptools-ldaptools)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

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