diff --git a/CHANGELOG.md b/CHANGELOG.md index 284fc6e1..51eccdcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ - Guzzle 6 client is now created according to the Httplug specifications with automated minimal behaviour. Make sure you configure the Httplug plugins as needed, for example if you want to get exceptions for failure HTTP status codes. +- **[BC] PluginClientFactory returns an instance of `Http\Client\Common\PluginClient`** (see [php-http/client-common#14](https://github.com/php-http/client-common/pull/14)) +- Plugins are loaded from their new packages ### Fixed diff --git a/ClientFactory/PluginClientFactory.php b/ClientFactory/PluginClientFactory.php index 2e0d81ff..120066e3 100644 --- a/ClientFactory/PluginClientFactory.php +++ b/ClientFactory/PluginClientFactory.php @@ -2,8 +2,8 @@ namespace Http\HttplugBundle\ClientFactory; -use Http\Client\Plugin\Plugin; -use Http\Client\Plugin\PluginClient; +use Http\Client\Common\Plugin; +use Http\Client\Common\PluginClient; /** * This factory creates a PluginClient. diff --git a/Collector/MessageJournal.php b/Collector/MessageJournal.php index dca7ccf3..8930d085 100644 --- a/Collector/MessageJournal.php +++ b/Collector/MessageJournal.php @@ -3,7 +3,7 @@ namespace Http\HttplugBundle\Collector; use Http\Client\Exception; -use Http\Client\Plugin\Journal; +use Http\Client\Common\Plugin\Journal; use Http\Message\Formatter; use Http\Message\Formatter\SimpleFormatter; use Psr\Http\Message\RequestInterface; diff --git a/DependencyInjection/HttplugExtension.php b/DependencyInjection/HttplugExtension.php index ca41fd1f..df43e3c8 100644 --- a/DependencyInjection/HttplugExtension.php +++ b/DependencyInjection/HttplugExtension.php @@ -2,8 +2,8 @@ namespace Http\HttplugBundle\DependencyInjection; -use Http\Client\Plugin\AuthenticationPlugin; -use Http\Client\Plugin\PluginClient; +use Http\Client\Common\Plugin\AuthenticationPlugin; +use Http\Client\Common\PluginClient; use Http\HttplugBundle\ClientFactory\DummyClient; use Http\Message\Authentication\BasicAuth; use Http\Message\Authentication\Bearer; @@ -119,6 +119,7 @@ private function configurePlugins(ContainerBuilder $container, array $config) foreach ($config as $name => $pluginConfig) { $pluginId = 'httplug.plugin.'.$name; + if ($pluginConfig['enabled']) { $def = $container->getDefinition($pluginId); $this->configurePluginByName($name, $def, $pluginConfig); diff --git a/Resources/config/data-collector.xml b/Resources/config/data-collector.xml index 680e806d..6f18a30e 100644 --- a/Resources/config/data-collector.xml +++ b/Resources/config/data-collector.xml @@ -10,7 +10,7 @@ null - + diff --git a/Resources/config/plugins.xml b/Resources/config/plugins.xml index 3c7debac..7980222a 100644 --- a/Resources/config/plugins.xml +++ b/Resources/config/plugins.xml @@ -4,27 +4,27 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - + - - + + - - - + + + - + null - - - + + + diff --git a/composer.json b/composer.json index b7605c77..b8ebe963 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,10 @@ "php": ">=5.5", "php-http/client-implementation": "^1.0", "php-http/message-factory": "^1.0.2", - "php-http/plugins": "^1.0", + "php-http/client-common": "^1.1", + "php-http/cache-plugin": "^1.0", + "php-http/logger-plugin": "^1.0", + "php-http/stopwatch-plugin": "^1.0", "symfony/options-resolver": "^2.7|^3.0", "symfony/framework-bundle": "^2.7|^3.0" },