Skip to content

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

Open
HecFranco wants to merge 1 commit into
getsentry:masterfrom
nowo-tech:feature/guzzle-8-support
Open

feat: add support for guzzlehttp/psr7 3.x and Guzzle 8#2169
HecFranco wants to merge 1 commit 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.

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.

1 participant