bluefrg / retry
A simple PHP function used to retry failed operations.
2.0.0
2024-12-12 04:14 UTC
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2026-03-01 00:10:47 UTC
README
A simple PHP function used to retry failed operations. Based on the work done by igorw. On a complete failure, the original exception will be thrown back rather than igorw's FailingTooHardException.
<?php // retry an operation up to 3 times $oUsr = Bluefrg/retry(3, function () use ($iId) { return User::find($iId); });
Install
$ composer require bluefrg/retry