Skip to content

Fix deprecated integer PSR-7 headers - #60

Open
vince83110 wants to merge 1 commit into
bpolaszek:masterfrom
vince83110:fix-guzzle-psr7-deprecation
Open

vince83110 wants to merge 1 commit into
bpolaszek:masterfrom
vince83110:fix-guzzle-psr7-deprecation

Conversation

@vince83110

Copy link
Copy Markdown
Contributor

Description
Fix deprecated integer header values passed to PSR-7 withHeader().

GuzzleHttp PSR-7 2.11 deprecates passing integers as header values, while GuzzleHttp PSR-7 3.0 requires header values to be strings or arrays of strings.

RequestBuilder currently passes integers for the TTL and Content-Length headers, triggering deprecation notices.

This change explicitly casts these values to strings while preserving the existing behavior and maintaining compatibility with supported Guzzle versions.

Changes
Cast TTL header value to string
Cast Content-Length header values to string
Add tests covering the generated headers

Motivation
This prevents deprecation notices with recent versions of guzzlehttp/psr7 and ensures compatibility with GuzzleHttp PSR-7 3.0.

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