Guzzle Promises is a promise library for PHP that implements the Promises/A+ specification with synchronous support.
The library solves the problem of managing asynchronous operations in PHP by providing promise chaining, synchronous waiting via a `wait()` method, cancellation, and utilities for composing groups of promises. Developers can chain operations using `then()` handlers and block until promises settle, making it suitable for both async workflows and scenarios requiring synchronous completion. The implementation includes a `getState()` method that reports how a promise was settled, though callers should invoke `wait()` before checking state on promises that may resolve with other promises, as the state alone does not guarantee the final outcome.
Most developers encounter this library indirectly through Guzzle's HTTP client, which uses it for asynchronous request methods like `requestAsync()`. Install the package directly when you need promise composition without the full HTTP client. The library supports multiple PHP versions across different release lines, with the latest version supporting PHP 7.4 and above.
The project maintains multiple supported versions with clear guidance on which to use. Security vulnerabilities are handled through a responsible disclosure process with a dedicated security contact. The codebase includes comprehensive documentation covering quick start, API reference, interoperability with other promise implementations, and implementation details, along with an upgrade guide for version transitions.