Skip to content

Support Guzzle 8 #429

Closed
Closed

Description

@pepeh

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, null and false are 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

Happy to help test a pre-release. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions