diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b3a7013..521a4900 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee # 2.0.0 - (unreleased) - Increased min PHP version to 8.1 +- Removed the deprecated `Http\HttplugBundle\ClientFactory\PluginClientFactory`. Use `Http\Client\Common\PluginClientFactory` instead. - Fixed a deprecation when creating a `HttpMethodsClient` via `http_methods_client: true`. Only PSR-17 factories are now passed as constructor arguments. - Changed the default stream factory argument for the cache plugin. This now requires a PSR-17 StreamFactoryInterface instance. - Creating a client using the `BuzzFactory` no longer accepts `verify_peer` and `verify_host` config options. Only a boolean `verify` flag is accepted, covering both previous options. diff --git a/src/ClientFactory/PluginClientFactory.php b/src/ClientFactory/PluginClientFactory.php deleted file mode 100644 index be99e9fb..00000000 --- a/src/ClientFactory/PluginClientFactory.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -final class PluginClientFactory -{ - /** - * @param Plugin[] $plugins - * @param array $config config to the client factory - * @param array $pluginClientOptions config forwarded to the PluginClient - * - * @return PluginClient - */ - public static function createPluginClient(array $plugins, ClientFactory|callable $factory, array $config, array $pluginClientOptions = []) - { - if ($factory instanceof ClientFactory) { - $client = $factory->createClient($config); - } elseif (is_callable($factory)) { - $client = $factory($config); - } else { - throw new \RuntimeException(sprintf('Second argument to PluginClientFactory::createPluginClient must be a "%s" or a callable.', ClientFactory::class)); - } - - return new PluginClient($client, $plugins, $pluginClientOptions); - } -}