Skip to content

feat: add support for guzzlehttp/psr7 3.x and Guzzle 8 - #2169

Closed
HecFranco wants to merge 2 commits into
getsentry:masterfrom
nowo-tech:feature/guzzle-8-support
Closed

feat: add support for guzzlehttp/psr7 3.x and Guzzle 8#2169
HecFranco wants to merge 2 commits into
getsentry:masterfrom
nowo-tech:feature/guzzle-8-support

Conversation

@HecFranco

Copy link
Copy Markdown

Summary

  • Widen guzzlehttp/psr7 to allow ^3.0 and guzzlehttp/promises to allow ^3.0, enabling installs alongside Guzzle 8.
  • Update GuzzleTracingMiddleware to resolve HTTP responses via method_exists(..., 'getResponse') instead of a hard dependency on Guzzle 7's RequestException, so tracing works with both Guzzle 7 and Guzzle 8 exception types.
  • Keep existing Guzzle 7 behavior intact while remaining compatible with Guzzle 8's exception hierarchy.

Test plan

  • Install the SDK with Guzzle 7 and confirm tracing middleware still attaches status codes from RequestException responses
  • Install with Guzzle 8 / guzzlehttp/psr7 3.x and confirm Composer resolves successfully
  • Exercise failed Guzzle 8 requests through GuzzleTracingMiddleware and verify response status is captured when getResponse() is available
  • Run the existing PHPUnit suite for tracing / Guzzle-related coverage

Made with Cursor

Widen PSR-7/promises constraints and resolve HTTP responses via method_exists for compatibility with Guzzle 7 and 8.
@HecFranco

Copy link
Copy Markdown
Author

Thank you for taking the time to review this contribution.

This PR adds compatibility with guzzlehttp/psr7 3.x and Guzzle 8 while preserving existing Guzzle 7 behavior. I would greatly appreciate your review and approval when you have a moment.

Please let me know if any changes or additional coverage would be helpful. Happy to iterate based on your feedback.

@glensc

glensc commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Duplicate: #2164

@stayallive stayallive closed this Aug 1, 2026
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.

3 participants