PHPackages                             gos/yolo - 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. gos/yolo

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

gos/yolo
========

Advanced Retry Implementation

v0.2.2(10y ago)4580MITPHPPHP &gt;=5.3

Since Jun 1Pushed 10y ago1 watchersCompare

[ Source](https://github.com/GeniusesOfSymfony/Yolo)[ Packagist](https://packagist.org/packages/gos/yolo)[ Docs](https://github.com/GeniusesOfSymfony/Yolo)[ RSS](/packages/gos-yolo/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Yolo
====

[](#yolo)

Advanced retry implementation.

Installation
------------

[](#installation)

```
composer require gos/yolo
```

Example
-------

[](#example)

Perform an action

```
$pusher->push($notification); #send notification over network
```

With YOLO :

```
use Gos\Component\Yolo\Yolo;

$maxRetry = 10; // Default is 5
$timeout = 10; // Default is 5 (in second), set 0 for not timeout
$allowedException = ['RuntimeException']; // empty by default, consider exception as a "success"
$yoloPush = new Yolo(array($pusher, 'push'), array($notification), $maxRetry, $timeout);
$yoloPush->run();
```

Sometimes we need more swag to retry over a webservice.

```
use Gos\Component\Yolo\Yolo;

$yoloPush = new Yolo(array($pusher, 'push'), array($notification));
$yoloPush->tryUntil(function(){
    $result = false;
    if ($fp = @fsockopen('my-web-service.dev', 1337, $errCode, $errStr, 1)) {
        $result = true;
        fclose($fp);
    }

    return $result;
});
```

If your operation have an hight cost, perform it when service is available instead of dummy retry.

You also can do :

```
use Gos\Component\Yolo\Yolo;

$yoloPush = new Yolo(array($pusher, 'push'), array($notification));
$yoloPush->tryUntil($pusher);
```

By implementing `Gos\Component\Yolo\YoloInterface` on your object. Add `isAvailable` and return true when it's ok.

You also can attach a logger to yolo (We implement `Psr\Log\LoggerAwareInterface`) . Swag

```
use Gos\Component\Yolo\Yolo;

$yolo = new Yolo(function(){});
$yolo->setLogger($mySwagPsrLogger);
```

Built in Callback
-----------------

[](#built-in-callback)

#### Ping Back

[](#ping-back)

```
use Gos\Component\Yolo\Yolo;
use Gos\Component\Yolo\Callback\PingBack;

$pingger = new PingBack('127.0.0.1', 80);

$yoloPush = new Yolo(function(){});
$yoloPush->tryUntil($pingger);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

4

Last Release

3931d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2697e85bca7c41cb6166cf78dca3156bdbbe7950189f0b958115201dcd9a919a?d=identicon)[ProPheT777](/maintainers/ProPheT777)

---

Tags

handlerretryyolo

### Embed Badge

![Health badge](/badges/gos-yolo/health.svg)

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

###  Alternatives

[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514139.2M693](/packages/symfony-lock)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k53](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M209](/packages/illuminate-broadcasting)[logiscape/mcp-sdk-php

Model Context Protocol SDK for PHP

368116.8k12](/packages/logiscape-mcp-sdk-php)

PHPackages © 2026

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