Skip to content

Add PSR-18 client resilience and header-setting decorators.#63

Merged
gustavofreze merged 1 commit into
mainfrom
feature/develop
Jul 13, 2026
Merged

Add PSR-18 client resilience and header-setting decorators.#63
gustavofreze merged 1 commit into
mainfrom
feature/develop

Conversation

@gustavofreze

Copy link
Copy Markdown
Member

RetryingClient retries network failures and 5xx responses with a configurable Backoff (FixedDelay or ExponentialBackoff with jitter), never retries 4xx, and reports every failed attempt to a RetryListener with its Elapsed duration and AttemptOutcome classification. Timeout statuses recognized by Code::isTimeout() (408 and 504) classify as TIMEOUT and stay retryable. Assembly goes through the fluent builder returned by RetryingClient::create(), which raises ClientNotConfigured without a client and resolves opinionated defaults otherwise.

HeaderSettingClient sets headers on every outbound request, resolving each value at send time and omitting headers whose value resolves to an empty string.

Duration measuring reuses tiny-blocks/time, now a direct requirement.

Please follow the contributing guidelines.

Summary

What this pull request does.

Related issue

Closes #...

Checklist

  • Tests added or updated.
  • Documentation updated when applicable.
  • composer review passes.
  • composer tests passes.

RetryingClient retries network failures and 5xx responses with a
configurable Backoff (FixedDelay or ExponentialBackoff with jitter),
never retries 4xx, and reports every failed attempt to a RetryListener
with its Elapsed duration and AttemptOutcome classification. Timeout
statuses recognized by Code::isTimeout() (408 and 504) classify as
TIMEOUT and stay retryable. Assembly goes through the fluent builder
returned by RetryingClient::create(), which raises ClientNotConfigured
without a client and resolves opinionated defaults otherwise.

HeaderSettingClient sets headers on every outbound request, resolving
each value at send time and omitting headers whose value resolves to an
empty string.

Duration measuring reuses tiny-blocks/time, now a direct requirement.
@gustavofreze gustavofreze merged commit aea6d9a into main Jul 13, 2026
7 checks passed
@gustavofreze gustavofreze deleted the feature/develop branch July 13, 2026 12:51
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