windwalker/promise
Windwalker Promise is a PHP library for asynchronous-style control flow, offering promises, deferreds, and helpers to chain callbacks, handle resolution and rejection, and orchestrate non-blocking tasks more cleanly in PHP applications.
Concurrency facade, Http::pool()), or build an internal helper. This is a low-cost decision to evaluate and a high-cost one to get wrong later, since promise semantics leak into every call site.BatchRunner contract) so the underlying implementation can be swapped for Laravel-native concurrency or amphp without rewriting feature code.Consider it when:
then, catch, finally, all, race) in a codebase that is not running an event loop, and you want a dependency with a small surface area rather than pulling in ReactPHP or amphp.Look elsewhere when:
Concurrency and Http::pool() cover the common cases with first-party support, testing utilities, and no added dependency.To executives: This is a small utility library, not a platform bet. It would let us parallelize slow outbound API calls inside existing PHP request and job lifecycles — a latency win with no new infrastructure. However, it has effectively no adoption (no stars, no downstream dependents, single maintainer), which means we would own its maintenance in practice. My recommendation is to treat it as an evaluation candidate, not a commitment: benchmark the native Laravel concurrency options first, and only adopt this if they fall short. Cost to trial is a few engineering days; cost of an unmaintained critical-path dependency is materially higher.
To engineering: The API is the familiar Promise/Deferred model — then/catch/all — framework-agnostic and small enough to read in an afternoon. It does not give you a scheduler or event loop; it structures composition over non-blocking work you already have (Guzzle async, stream sockets, queue fan-out). Two asks before we adopt: (1) confirm the Laravel 11 Concurrency facade and Http::pool() don’t already cover our target use cases, and (2) if we proceed, wrap it behind an internal contract with contract tests so swapping to Concurrency, Guzzle promises, or amphp later is a one-file change rather than a refactor. We should also pin the version and document the fallback plan given the maintenance profile.
Bottom line: Low opportunity score, low risk to evaluate, moderate risk to depend on. Run a time-boxed spike against native Laravel options; default to first-party unless the spike shows a clear gap.
How can I help you explore Laravel packages today?