diff --git a/CHANGELOG-WIP.md b/CHANGELOG-WIP.md index c8c64ee1bff..89f0f4f12d7 100644 --- a/CHANGELOG-WIP.md +++ b/CHANGELOG-WIP.md @@ -11,6 +11,7 @@ - Deprecated the `ucfirst` Twig filter. `capitalize` should be used instead. ## Extensibility +- `GuzzleHttp\Client` is now instantiated via `Craft::createObject()`. ([#16366](https://github.com/craftcms/cms/pull/16366)) - `craft\helpers\DateTimeHelper::humanDuration()` now has a `$language` argument. ([#16332](https://github.com/craftcms/cms/pull/16332)) ## System diff --git a/src/Craft.php b/src/Craft.php index 31d626c7ffe..002a30c7a0d 100644 --- a/src/Craft.php +++ b/src/Craft.php @@ -398,7 +398,7 @@ public static function createGuzzleClient(array $config = []): Client $guzzleConfig['proxy'] = $generalConfig->httpProxy; } - return new Client($guzzleConfig); + return Craft::createObject(Client::class, [$guzzleConfig]); } }