Skip to content
CAI
Software that uses CAICheck a score

guzzle/promises

66.8

Adequate · 13 November 2026

1.9k

lines of production code

PHP

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a PHP library implementing asynchronous promise-based concurrency for handling multiple tasks without causing stack overflows. It provides utilities for managing promise states, aggregating exceptions, and executing iterative callbacks via a global task queue. The codebase includes comprehensive testing and strict static analysis to ensure reliability across supported PHP versions.

Behavioural changes

Guzzle Promises 3.0 release with breaking API changes

This release raises the minimum PHP version to 7.4 and introduces several breaking changes to the promise API. Collection helpers now strictly require iterable inputs, meaning single promises or scalars must be wrapped in an array before passing to functions like \Each::of()\ or \Utils::all()\. The \Utils::inspect()\ function now returns the actual rejection reason instead of unwrapping \RejectionException\ instances. Additionally, static helper classes like \Create\, \Each\, and \Utils\ are now non-instantiable, and native PHP serialization of runtime promise objects is rejected to prevent state corruption. Generic PHPDoc types have been added to improve static analysis, and \PromiseInterface::resolve()\ now accepts an optional value.

(repo-wide) · high confidence

Promise resolution is now asynchronous and iterative

The promise library has been refactored to avoid recursion and prevent stack overflows by executing all \then\ callbacks asynchronously via a global task queue (\Utils::queue\). This means that chaining handlers on \FulfilledPromise\ or \RejectedPromise\ no longer executes them immediately; instead, they are scheduled to run in the next task queue cycle. To support this, the \PromiseInterface\ has been updated with new constants (\PENDING\, \FULFILLED\, \REJECTED\), a new \otherwise\ method for rejection handling, and stricter type signatures. Additionally, new classes like \AggregateException\, \CancellationException\, \Coroutine\, and \Each\ have been introduced to provide higher-level abstractions for handling multiple promises, coroutines, and concurrent iteration.

src · high confidence

Test coverage

Comprehensive test suite for GuzzleHttp Promise library

Added a complete PHPUnit test suite covering the core promise components, including AggregateException, Coroutine, Create, EachPromise, Each, Is, NonSerializableTrait, PropertyHelper, RejectionException, TaskQueue, Utils, FulfilledPromise, and RejectedPromise. The tests verify promise states, resolution/rejection behaviors, concurrency limits, serialization restrictions, and utility functions, ensuring the library's reliability and correctness.

tests · high confidence

Dependencies

Updated PHP version requirements and static analysis tooling

The project now requires PHP 7.4 or 8.0, dropping support for older versions. Development dependencies have been updated to use PHPUnit 9.6.34 and the bamarni/composer-bin-plugin. Additionally, static analysis tooling has been configured via vendor-bin manifests, introducing specific versions for php-cs-fixer (3.95.2), phpstan (2.1.55), and composer-normalize (2.52.0).

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 64 → 67 (+2.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 70 → 69 (-1.0)
  • Architecture 98 → 99 (+0.9)
  • Maturity 47 → 53 (+5.4)
  • Readiness 80 → 80 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (2)

  • Change coupling: FulfilledPromise.php ↔ RejectedPromise.php (src/FulfilledPromise.php)
  • Off-boarding risk: anonymized user #1

New (3)

  • Edited copy of a member (18 corresponding lines) (src/FulfilledPromise.php)
  • Edited copy of a member (28 corresponding lines) (src/Utils.php)
  • Off-boarding risk: anonymized user #1

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

guzzle/promises was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 094d0ec418eb3b1411ea271a180ec95cae6ae933 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-859b6d22580d.