PHPackages                             wyrihaximus/recoil-callable - 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. wyrihaximus/recoil-callable

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

wyrihaximus/recoil-callable
===========================

Wrap any coroutine callable and run it through RecoilPHP on invocation

1.0.0(7y ago)31.3k[4 PRs](https://github.com/WyriHaximus/recoilphp-callable/pulls)MITPHPPHP ^7.2

Since Sep 26Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/recoilphp-callable)[ Packagist](https://packagist.org/packages/wyrihaximus/recoil-callable)[ RSS](/packages/wyrihaximus-recoil-callable/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

RecoilPHP callable wrapper
==========================

[](#recoilphp-callable-wrapper)

Wrap any coroutine callable and run it through RecoilPHP on invocation

[![Build Status](https://camo.githubusercontent.com/7b228d94ed7e3850e4ad0f3238d0f173f94c741f65836592fe9c74ff7d5675d2/68747470733a2f2f7472617669732d63692e636f6d2f57797269486178696d75732f7265636f696c7068702d63616c6c61626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/WyriHaximus/recoilphp-callable)[![Latest Stable Version](https://camo.githubusercontent.com/e3e720fc7858a281869c109f4d106a75898f7560f71f012863d53657df7e623d/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7265636f696c2d63616c6c61626c652f762f737461626c652e706e67)](https://packagist.org/packages/WyriHaximus/recoil-callable)[![Total Downloads](https://camo.githubusercontent.com/329a0eb0f34e6d77ce370b7772cf22ff6d5ded8d9f493aa67719a34783a400dc/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7265636f696c2d63616c6c61626c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/WyriHaximus/recoil-callable)[![Code Coverage](https://camo.githubusercontent.com/2185cabd506eec074df4398474a26189c986eaaed592ac6c0d73a97c57fd52a2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57797269486178696d75732f7265636f696c7068702d63616c6c61626c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WyriHaximus/recoilphp-callable/?branch=master)[![License](https://camo.githubusercontent.com/abf259a03a23d8c2dd3f7cec76892f38318fed2c4cac94d571ce40c934ef7ac5/68747470733a2f2f706f7365722e707567782e6f72672f57797269486178696d75732f7265636f696c2d63616c6c61626c652f6c6963656e73652e706e67)](https://packagist.org/packages/WyriHaximus/recoil-callable)[![PHP 7 ready](https://camo.githubusercontent.com/42718cddeb81248571079e9a79343ed0f98fbc659d6f1cf0bbf642e84f6d6cbf/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f57797269486178696d75732f72656163747068702d687474702d6d6964646c65776172652d636c6561722d626f64792f62616467652e737667)](https://travis-ci.org/WyriHaximus/reactphp-http-middleware-clear-body)

Install
=======

[](#install)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/recoil-callable

```

Use
===

[](#use)

Best used for event handlers or promise handlers to turn any callable event/promise handler into a coroutine easily:

```
$caller = new QueuedCalled(); // Any implementor of QueueCallerInterface
$callableWrapper = new CallableWrapper($caller);
$eventEmitter = new EventEmitter();
$eventEmitter->on('event', $callableWrapper->callable(function ($input) {
    $result = yield asyncFunction($input);
    $finalResult = yield anotherAsyncFunction($result);

    return $finalResult;
});
```

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2018 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance43

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 53.1% 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

2786d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (26 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")

---

Tags

callablehacktoberfestphpphp7reactphprecoilphp

### Embed Badge

![Health badge](/badges/wyrihaximus-recoil-callable/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-recoil-callable/health.svg)](https://phpackages.com/packages/wyrihaximus-recoil-callable)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.4k187.2M2.6k](/packages/composer-composer)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[reactivex/rxphp

Reactive extensions for php.

1.7k3.2M49](/packages/reactivex-rxphp)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[wyrihaximus/react-child-process-messenger

Messenger decorator for react/child-process

32279.4k4](/packages/wyrihaximus-react-child-process-messenger)[wyrihaximus/react-cron

⏱️ Cronlike scheduler running inside the ReactPHP Event Loop

4050.6k](/packages/wyrihaximus-react-cron)

PHPackages © 2026

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