php-standard-library/promise
Lightweight Promise implementation for PHP with a simple, standards-inspired API. Create, resolve, reject, and chain async-style operations, handle errors, and compose results with familiar then/catch patterns—ideal for libraries that need non-blocking workflows.
Avoid if:
Illuminate\Support\Facades\Promise) and don’t need cross-framework compatibility or additional features.Consider if:
Promise::all() or Promise::race()).*"This is a low-risk, high-reward upgrade to our async workflows in Laravel. By adopting this lightweight Promise library, we can:
*"This gives us a clean, dependency-free Promise implementation to:
then/catch/finally chains for async operations (e.g., API calls, database queries, or queue jobs).Promise::all() or Promise::race().dispatch() calls in queue workers to chain dependent jobs..then() chains."**"This package enables us to:
fetchUser().then(fetchOrders).then(renderDashboard)) without nesting callbacks.
Trade-off: It’s not a replacement for Laravel’s queues or fibers, but it’s a low-cost way to modernize async logic today."*How can I help you explore Laravel packages today?