Skip to content

Improve retry middleware and update documentation#615

Open
ksvirkou-hubspot wants to merge 3 commits into
masterfrom
feature/updateReadme
Open

Improve retry middleware and update documentation#615
ksvirkou-hubspot wants to merge 3 commits into
masterfrom
feature/updateReadme

Conversation

@ksvirkou-hubspot
Copy link
Copy Markdown
Collaborator

@ksvirkou-hubspot ksvirkou-hubspot commented May 11, 2026

Summary

  • Renamed README section from "Rate and Concurrent Limiting" to "Retry Middleware" — the old title was inaccurate
  • Documented all three middleware, default retry count (5), available delay helpers, and the new empty-array behaviour for createConnectionErrorsMiddleware
  • getRetryFunctionByConnectionErrors: swapped param order so $curlErrorCodes is first, as it is the primary customization point for this method
  • Passing an empty $curlErrorCodes to createConnectionErrorsMiddleware now retries all ConnectExceptions unconditionally instead of silently skipping them
  • Delay::getExponentialDelayFunction deprecated — callers should pass null and let Guzzle apply its built-in exponential backoff via RetryMiddleware::exponentialDelay

Test plan

  • Verify createConnectionErrorsMiddleware() retries on cURL errors 52, 55, 56 (default behaviour unchanged)
  • Verify createConnectionErrorsMiddleware([], ...) retries all ConnectExceptions
  • Verify passing null delay to any middleware uses Guzzle exponential backoff

🤖 Generated with Claude Code

ksvirkou-hubspot and others added 3 commits May 11, 2026 16:47
- `getRetryFunctionByConnectionErrors`: swapped param order so `$curlErrorCodes` comes first, consistent with how it is the primary customization point
- Passing an empty `$curlErrorCodes` now retries all `ConnectException`s unconditionally, rather than silently skipping them
- `getExponentialDelayFunction` deprecated in favour of passing `null` and letting Guzzle apply its built-in exponential backoff
- README section renamed from "Rate and Concurrent Limiting" to "Retry Middleware", covering all three middleware, default retry count, available delay helpers, and the empty-array behaviour

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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