PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | vendor_prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php +6 -1 27.9 → trunk View file →
@@ -39,17 +39,22 @@
39 39 public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null)
40 40 {
41 41 $this->decider = $decider;
42 42 $this->nextHandler = $nextHandler;
43 - $this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
43 + $this->delay = $delay ?: static function (int $retries) : int {
44 + return (int) 2 ** ($retries - 1) * 1000;
45 + };
44 46 }
45 47 /**
46 48 * Default exponential backoff delay function.
47 49 *
48 50 * @return int milliseconds.
51 + *
52 + * @deprecated since 7.11, will be removed in 8.0.
49 53 */
50 54 public static function exponentialDelay(int $retries) : int
51 55 {
56 + \YoastSEO_Vendor\trigger_deprecation('guzzlehttp/guzzle', '7.11', '%s::%s() is deprecated and will be removed in 8.0.', __CLASS__, __FUNCTION__);
52 57 return (int) 2 ** ($retries - 1) * 1000;
53 58 }
54 59 public function __invoke(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, array $options) : \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface
55 60 {