PHPackages                             netlogix/retry - 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. netlogix/retry

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

netlogix/retry
==============

Retries a specific PHP code fragment.

1.0.0(9mo ago)178.8k↑81.3%1MITPHPPHP &gt;=8.1CI passing

Since Aug 5Pushed 9mo agoCompare

[ Source](https://github.com/netlogix/retry)[ Packagist](https://packagist.org/packages/netlogix/retry)[ RSS](/packages/netlogix-retry/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Netlogix Retry
==============

[](#netlogix-retry)

Retries a specific PHP code fragment (called a "task") as long as the "when" condition evaluates to `true`.

```
(new \Netlogix\Retry\Retry())
    ->when(condition: fn(int $incarnation) => $incarnation < PHP_INT_MAX)
    ->task(subject: fn () => throw new \RuntimeException('false'));
```

There is a shorthand method for counting retries and sleeping between attempts with increasing intervals.

```
(new \Netlogix\Retry\Retry())
    /**
     * http://backoffcalculator.com/?attempts=5&rate=1&interval=0.5
     * = (0.5 + 1 + 1.5 + 2.0 + 2.5) seconds
     * = 7.5 seconds
     */
    ->withExponentialBackoff(retryInterval: 0.5, maxRetries: 5)
    ->onExceptionsOfType(\Doctrine\DBAL\Exception\DeadlockException::class)
    ->task(fn () => $dbal->executeQuery($statement));
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance57

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

286d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/667b5107f4c2ea180baa00166c2ee3f2a1b412ce22768d6e81bb09323d1c7fe0?d=identicon)[netlogix](/maintainers/netlogix)

![](https://www.gravatar.com/avatar/5e9d252cc7b69322d8e53f44c568fe44f40e7fb7142a175c2223c3199ce8b739?d=identicon)[stephanschuler](/maintainers/stephanschuler)

---

Top Contributors

[![stephanschuler](https://avatars.githubusercontent.com/u/1595908?v=4)](https://github.com/stephanschuler "stephanschuler (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/netlogix-retry/health.svg)

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

###  Alternatives

[ericclemmons/rules-bundle

Configuration-based logic for your domain models

2013.8k](/packages/ericclemmons-rules-bundle)[mouf/html.widgets.statsgrid

This PHP package contains a HTML pivot table. You provide it with a data set and the list of columns and rows and it will display a nice pivot table.

239.8k](/packages/mouf-htmlwidgetsstatsgrid)

PHPackages © 2026

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