bluefrg / retry
A simple PHP function used to retry failed operations.
Installs: 6 035
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2025-01-12 04:34:37 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