← All changes
|
vendor_prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php
+3
-0
27.6
→
trunk
View file →
| @@ -34,11 +34,14 @@ | ||
| 34 | 34 | $this->handlerContext = $handlerContext; |
| 35 | 35 | } |
| 36 | 36 | /** |
| 37 | 37 | * Wrap non-RequestExceptions with a RequestException |
| 38 | + * | |
| 39 | + * @deprecated since 7.11. Create a RequestException directly instead. | |
| 38 | 40 | */ |
| 39 | 41 | public static function wrapException(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, \Throwable $e) : \YoastSEO_Vendor\GuzzleHttp\Exception\RequestException |
| 40 | 42 | { |
| 43 | + \YoastSEO_Vendor\trigger_deprecation('guzzlehttp/guzzle', '7.11', '%s::wrapException() is deprecated and will be removed in 8.0. Create a %s directly instead.', self::class, self::class); | |
| 41 | 44 | return $e instanceof \YoastSEO_Vendor\GuzzleHttp\Exception\RequestException ? $e : new \YoastSEO_Vendor\GuzzleHttp\Exception\RequestException($e->getMessage(), $request, null, $e); |
| 42 | 45 | } |
| 43 | 46 | /** |
| 44 | 47 | * Factory method to create a new exception with a normalized error message |