Promises/A+ implementation that handles promise chaining and resolution iteratively, allowing for "infinite" promise chaining while keeping the stack size constant. A promise represents the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its then method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. Callbacks are registered with the then method by providing an optional $onFulfilled followed by an optional $onRejected function. Resolving a promise means that you either fulfill a promise with a value or reject a promise with a reason. Resolving a promises triggers callbacks registered with the promises's then method. These callbacks are triggered only once and in the order in which they were added.

Features

  • Promises/A+ implementation
  • Promise resolution and chaining is handled iteratively, allowing for "infinite" promise chaining
  • Promises have a synchronous wait method
  • Promises can be cancelled
  • Works with any object that has a then function
  • C# style async/await coroutine promises using GuzzleHttp\Promise\Coroutine

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Guzzle Promises

Guzzle Promises Web Site

Other Useful Business Software
$300 in Free Credit Towards Top Cloud Services Icon
$300 in Free Credit Towards Top Cloud Services

Build VMs, containers, AI, databases, storage—all in one place.

Start your project in minutes. After credits run out, 20+ products include free monthly usage. Only pay when you're ready to scale.
Get Started
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Guzzle Promises!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2021-08-13