Skip to content

Add support for Guzzle 8 and PSR-7 / promises 3.x - #357

Merged
gregurco merged 3 commits into
8p:masterfrom
nowo-tech:feature/guzzle-8-support
Aug 11, 2026
Merged

Add support for Guzzle 8 and PSR-7 / promises 3.x#357
gregurco merged 3 commits into
8p:masterfrom
nowo-tech:feature/guzzle-8-support

Conversation

@HecFranco

Copy link
Copy Markdown
Contributor

Summary

  • Widen Composer constraints to allow guzzlehttp/guzzle ^8.0, guzzlehttp/psr7 ^3.0, and guzzlehttp/promises ^3.0 while keeping Guzzle 6/7 support.
  • Update middlewares to resolve HTTP responses via method_exists(..., 'getResponse') instead of hard-typing Guzzle 7's RequestException, so logging and event dispatch work with Guzzle 8's exception hierarchy.

Why a separate PR from #355

#355 (draft) drops Guzzle 6 and Symfony 5 and updates CI. This PR is intentionally additive: it keeps existing supported majors and only adds the runtime compatibility needed for Guzzle 8. Happy to rebase/align with #355 if you prefer that direction.

Test plan

  • Install with Guzzle 7 and run the test suite
  • Install with Guzzle 8 / psr7 3 / promises 3 and confirm Composer resolves
  • Trigger a failed request and verify Log / SymfonyLog / EventDispatch middlewares still capture the response when present

Related issue: will link after creation.

Made with Cursor

@HecFranco

Copy link
Copy Markdown
Contributor Author

Closes #356

Widen composer constraints and extract responses via method_exists so middleware stays compatible with Guzzle 7 RequestException and Guzzle 8 ResponseException.
@HecFranco
HecFranco force-pushed the feature/guzzle-8-support branch from 4d08133 to 84ae2c9 Compare August 4, 2026 08:15
@HecFranco

Copy link
Copy Markdown
Contributor Author

Thank you for your time reviewing this PR!

CI is green on the supported PHP/Symfony matrix. Could you please consider approving and merging when you have a moment? This would unblock projects that need Guzzle 8 (with PSR-7 / promises 3.x) while remaining compatible with Guzzle 6/7.

Happy to adjust anything if needed. Thanks again!

@HecFranco

Copy link
Copy Markdown
Contributor Author

Hi @gregurco — gentle ping on this one.

CI is green across the PHP/Symfony matrix. This PR is intentionally additive (keeps Guzzle 6/7 + Symfony 5) and only adds Guzzle 8 / PSR-7 3 / promises 3 support, plus a small middleware tweak so response extraction works with Guzzle 8’s exception hierarchy.

I saw your draft #355, which takes a broader approach (dropping older majors / CI updates). Happy to follow whichever direction you prefer:

  1. Merge this PR as a minimal unblock for Guzzle 8, and fold the larger cleanup into Support Guzzle 8.0 #355 later, or
  2. Close this in favor of Support Guzzle 8.0 #355 — I can rebase/adapt the middleware compatibility bits onto your branch if useful.

This is currently blocking our upgrade to Guzzle 8. Thanks for taking a look when you have a moment!

@gregurco
gregurco merged commit ca64261 into 8p:master Aug 11, 2026
16 checks passed
@gregurco

Copy link
Copy Markdown
Member

@HecFranco thank you for the contribution 🙌

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants