Skip to content

feat: add support for guzzlehttp/psr7 and guzzlehttp/promises 3.0 - #2164

Open
Roman3349 wants to merge 2 commits into
getsentry:masterfrom
Roman3349:feature/guzzle-psr7_3.x
Open

feat: add support for guzzlehttp/psr7 and guzzlehttp/promises 3.0#2164
Roman3349 wants to merge 2 commits into
getsentry:masterfrom
Roman3349:feature/guzzle-psr7_3.x

Conversation

@Roman3349

Copy link
Copy Markdown

Description

Adds support for guzzlehttp/psr7 v3.0 and guzzlehttp/promises v3.0.

Fixes header type in Sentry\Tests\Integration\RequestIntegrationTest::testInvoke test.

Issues

Reminders

@Roman3349
Roman3349 force-pushed the feature/guzzle-psr7_3.x branch from 5f81bed to 86148c3 Compare July 23, 2026 12:30
@Litarnus

Copy link
Copy Markdown
Contributor

Thanks for the PR, I will need a bit of time to check if the major has some changes that could affect us and then I will come back to you

Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
@Roman3349
Roman3349 force-pushed the feature/guzzle-psr7_3.x branch from 86148c3 to cb10483 Compare July 23, 2026 12:47
@glensc

glensc commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Duplicate: #2169

@Litarnus

Copy link
Copy Markdown
Contributor

Looks like ServerRequest::fromGlobals got stricter now and could raise an exception in RequestFetcher in case some headers are malformed. Could you wrap it in a try/catch and return null on failure

…ntroduced in Guzzle 8

Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
@Roman3349

Copy link
Copy Markdown
Author

@Litarnus Thank you for the helpful suggestion, I've fixed it. I found that GuzzleHttp\Psr7\Request::assertMethod and GuzzleHttp\Psr7\Request::assertProtocolVersion can throw a \InvalidArgumentException, so I caught it. Or would you rather catch all \Throwable instances?

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