Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Guzzle Retry Middleware Laravel Package

caseyamcl/guzzle_retry_middleware

Guzzle middleware that automatically retries failed HTTP requests with configurable delays and retry conditions. Helps handle transient network errors, 5xx responses, and rate limiting with backoff strategies, improving resilience without changing client code.

View on GitHub
Deep Wiki
Context7
3.0

Added

  • Support for Guzzle 8
  • PHP 8.5 in GitHub builds

Changed

  • Minimum PHP version is now 7.4 (required by Guzzle 8)
  • Upgraded php_codesniffer and phpstan packages

Removed

  • Dropped support for Guzzle 6, Guzzle 7, and PHP 7.2/7.3 (use v2.x)
2.1

Added

  • Added retry_enabled parameter to allow quick disable of retry on specific requests
  • Added ability to pass in a callable to default_retry_multiplier in order to implement custom delay logic
2.9.0
2.8.0

Added

Changed

  • Added some extra parameters to PHPStan checks to make sure they don't fail on automated builds
  • Minor README updates
2.7.1

Fixed

  • Composer 2.2+ security issue with installing phpstan/extension-installer
  • Ensure XDEBUG_MODE environment variable is set when running PHPUnit
2.7.0

Added

Changed

  • Upgraded to PHPStan 1.2
  • Improved comments for options array
2.6.1

Added

  • PHPStan in dev dependencies
  • Additional build checks (PHPStan and PHP-CS)
  • Automatic SVG badge generation for code coverage

Fixed

  • Made GuzzleRetryMiddleware::__construct method final
  • $options parameter comments PHPStan was complaining about
  • shouldRetryHttpResponse values assume that the $response parameter is not null
  • Ensure date $dateFormat is never NULL or empty string in deriveTimeoutFromHeader
  • Additional cleanup based on PHPStan report

Removed

  • Build dependency on scrutinizer.org service
2.6

Added

  • GitHub Actions build status badge in README.md
  • Support for custom date formats in Retry-After header via new retry_after_date_format option
  • max_allowable_timeout_secs option to set a ceiling on the maximum time the client is willing to wait between requests
  • Support for Guzzle 7 class-based static methods

Changed

  • Removed unnecessary comments
  • Name of GitHub Action to Github Build

Removed

  • .travis.yml build support (switched to GitHub Actions)
2.5

Added

  • Ability to handle non-integer values in Retry-After headers (thanks @andrewdalpino)
  • Beginning GitHub Workflows code (support for Travis-CI will be removed in the next minor version)
  • Support for PHP v8.0 in composer.json
2.4

Added

  • Option to specify custom HTTP header name other than Retry-After (thanks @jamesaspence)

Changed

  • Added a few things to .gitignore (minor)
  • Updated phpunit.xml.dist to latest spec

Removed

  • Removed build tests for PHP 7.1 in .travis.yml
2.3.3

Changed

  • Minimum allowed version of PHPUnit is v7.5
  • Made version constraint syntax consistent in composer.json
  • Updated alias for dev-master to 2.0-dev in composer.json

Fixed

  • Cleaned up comments and updated syntax in tests to be compatible with newer versions of PHPUnit (v8 and v9)
2.3.2

Added

2.3.1

Added

  • declare(strict_types=1) in unit test file

Changed

  • Fixes to README.md
  • Code tweaks: Upgrade to PSR-12 compliance
2.3

Added

  • PHP 7 goodness: declare(strict_types=1) and method return signatures
  • PHP v7.3 tests in .travis.yml

Changed

  • Made minimum requirement for PHP v7.1 (note: this is considered a compatible change)
  • Updated to Carbon 2.0 (only affects tests)
  • The $request and $options variables are now passed by reference in the retry callback to allow for modification (thanks @Krunch!)

Removed

  • Removed unsupported tests for unsupported PHP versions from .travis.yml file
  • Removed support for older versions of PHPUnit

Fixed

  • Always ensure positive integer used when calculating delay timeout (fixes #12)
  • Retry connect exception regardless of cURL error code (thanks @LeoniePhiline) (fixes #14)
2.2

Added

  • Added expose_retry_header and retry_header options for debugging purposes (thanks, @coudenysj)
  • Travis CI now tests PHP v7.2

Changed

  • Allow newer versions of PHPUnit in composer.json (match Guzzle composer.json PHPUnit requirements)

Fixed

  • Refactored data provider method name in PHPUnit test (testRetryOccursWhenStatusCodeMatchesProviderproviderForRetryOccursWhenStatusCodeMatches)
  • Use PHPUnit new namespaced class name
  • Fix phpunit.xml.dist specification so that PHPUnit no longer emits warnings
  • Travis CI should use lowest library versions on lowest supported version of PHP (v5.5, not 5.6)

Removed

  • hhvm tests in Travis CI; they were causing builds to fail
2.13.0

Changed

  • Delay is now set in the options array rather than using usleep. This prevents blocking when running parallel requests (thanks @teandr).
2.12.1

Changed

  • Added GitHub build action for PHP 8.4
  • Updated GitHub build action/checkout and action/cache

Fixed

  • Implicit nullable in doRetry method (for PHP 8.4)
2.12.0

Added

2.11.0

Added

Removed

  • .scrutinizer.yml file (not used anymore)
2.10.0

Added

Fixed

  • Ensure that no requests are sent after the give_up_after_secs expires, and fail quickly (thanks @rubentebogt)
  • Minor code syntax and comment fixes
  • Cleaned up this CHANGELOG a bit
2.0

Added

  • Added ability to retry on connect or request timeout (retry_on_timeout option)
  • Added better tests for retry callback

Changed

  • Changed callback signature for on_retry_callback callback. Response object is no longer guaranteed to be present, so the callback signature now looks like this: (int $retryCount, int $delayTimeout, RequestInterface $request, array $options, ResponseInterface|null $response).
  • Updated Guzzle requirement to v6.3 or newer

Fixed

  • Clarified and cleaned up some documentation in README, including a typo.
1.0

Added

  • Everything; this is the initial version.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity