Repository navigation
Closed
Description
Problem
Guzzle 8.0.0 was released on 2026-07-20 (current: 8.2.0). The latest SDK release, 3.1.3, requires:
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/promises": "^1.5.3|^2.0",
"guzzlehttp/psr7": "^2.7",Guzzle 8 requires guzzlehttp/promises ^3.0.2 and guzzlehttp/psr7 ^3.1, so all three constraints block the upgrade. Every application using cloudinary_php is stuck on Guzzle 7:
$ composer why-not guzzlehttp/guzzle 8.2.0
cloudinary/cloudinary_php 3.1.3 requires guzzlehttp/guzzle (^7.4.5)
guzzlehttp/guzzle 8.2.0 requires guzzlehttp/promises (^3.0.2)
guzzlehttp/guzzle 8.2.0 requires guzzlehttp/psr7 (^3.1)
Proposed change
Allow both majors, so existing Guzzle 7 users are not affected:
"guzzlehttp/guzzle": "^7.4.5|^8.0",
"guzzlehttp/promises": "^1.5.3|^2.0|^3.0",
"guzzlehttp/psr7": "^2.7|^3.0",Guzzle 8 supports PHP ^7.4 || ^8.0, so the SDK's php >=8.0 requirement doesn't need to change. A CI job against both Guzzle majors would keep this from regressing.
Things worth checking
From the Guzzle 8 upgrade guide, compared against what the SDK uses (Client, Promise\Create, PromiseInterface, Psr7\Uri, Psr7\LimitStream,
Psr7\Utils::streamFor, ClientException):
- Header values must be strings (or non-empty arrays of strings). Integers,
nullandfalseare no longer cast. The headers the SDK sets itself (User-Agent,Authorization,X-Unique-Upload-Id,Content-Range) already look fine, but headers merged in from call options should be double-checked. - Request method casing is preserved. Methods must be passed in uppercase.
- The psr7 3.x and promises 3.x upgrade guides, since the async API and the chunked upload rely on both.
Related
- Support of guzzlehttp/guzzle ^7.0.1 #219 (same request for Guzzle 7)
- Drop Guzzle requirement and replace with any PSR-18 HttpClient #396 (drop the hard Guzzle dependency in favor of PSR-18). That would fix this kind of problem for good. Widening the constraints is the quick fix until then.
Happy to help test a pre-release. Thanks!
Metadata
Metadata
Assignees
Labels
No labels
Activity
Add support for `Guzzle 8`