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
Go From AI Idea to AI App Fast Icon
Go From AI Idea to AI App Fast

One platform to build, fine-tune, and deploy ML models. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
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