v3.15.0 brings rate-limit visibility and opt-in HTTP 429 retries to the PHP 7.4-compatible v3 line. Existing clients keep their current retry behavior unless they select the new strategy.
Added
Response::header()andheaders()expose response headers.Response::rateLimit()parses Mollie'sRateLimitandRateLimit-Policyheaders into aRateLimitobject with the policy, remaining requests, restore time, burst, quota, and window. Missing or malformed rate-limit headers returnnull.TooManyRequestsException::getRetryAfterSeconds()exposesRetry-Afteras a delay in seconds, accepting both integer seconds and HTTP-date values.ExponentialRetryStrategycan retry temporary network failures and HTTP 429 responses. It supports exponential backoff, optional jitter, and a maximum delay budget. A 429 whoseRetry-Afterexceeds that budget is thrown rather than delayed.ConditionalRetryStrategyContractlets custom strategies decide which exceptions to retry and use the triggering exception when calculating a delay.
Compatibility
LinearRetryStrategy remains the default and continues to retry temporary network failures as before. The original RetryStrategyContract is unchanged, so existing custom strategies require no migration. The new behavior is opt-in:
use Mollie\Api\Http\ExponentialRetryStrategy;
$client->setRetryStrategy(new ExponentialRetryStrategy());See the retry guide for configuration and custom strategy examples, or compare v3.14.0 with v3.15.0 for all changes.