From 1360d83e498652cd2f153806f09a8baa5dab5083 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 21 Jan 2019 12:57:39 +0100 Subject: [PATCH 1/4] Update date in changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a45fcba..d5336d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## 2.0 (unreleased) +## 2.0.0- 2019-01-21 ### Changed - HttpClientRouter now throws a HttpClientNoMatchException instead of a RequestException if it can not find a client for the request. @@ -10,7 +10,7 @@ - Abstract method `HttpClientPool::chooseHttpClient()` has now an explicit return type (`Http\Client\Common\HttpClientPoolItem`) - Interface method `Plugin::handleRequest(...)` has now an explicit return type (`Http\Promise\Promise`) - Made classes final that are not intended to be extended. - Added interfaces for BatchClient, HttpClientRouter and HttpMethodsClient. +- Added interfaces for BatchClient, HttpClientRouter and HttpMethodsClient. (These interfaces use the `Interface` suffix to avoid name collisions.) - Added an interface for HttpClientPool and moved the abstract class to the HttpClientPool sub namespace. - AddPathPlugin: Do not add the prefix if the URL already has the same prefix. From e3c834fb954378940b3b7f43960af7c49d1a9fba Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Mon, 21 Jan 2019 13:10:53 +0100 Subject: [PATCH 2/4] minor --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5336d8..13ecaf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log -## 2.0.0- 2019-01-21 +## 2.0.0 (unreleased) + + +## 2.0.0-RC1 - 2019-01-21 ### Changed - HttpClientRouter now throws a HttpClientNoMatchException instead of a RequestException if it can not find a client for the request. From 2d494ba468b9e2870ee122d75b61ebcf4e53d01a Mon Sep 17 00:00:00 2001 From: Nyholm Date: Sun, 3 Feb 2019 17:24:14 +0100 Subject: [PATCH 3/4] minor --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13ecaf3..3c90ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,6 @@ # Change Log -## 2.0.0 (unreleased) - - -## 2.0.0-RC1 - 2019-01-21 +## 2.0.0 - 2019-02-03 ### Changed - HttpClientRouter now throws a HttpClientNoMatchException instead of a RequestException if it can not find a client for the request. From 628e18dbbfc8345802bbec44db7c3b9da66f5330 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Sun, 3 Feb 2019 17:43:50 +0100 Subject: [PATCH 4/4] minor cleanup --- src/BatchClientInterface.php | 2 +- src/Exception/BatchException.php | 1 + src/Plugin/ContentTypePlugin.php | 3 --- src/PluginClient.php | 2 +- src/PluginClientFactory.php | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/BatchClientInterface.php b/src/BatchClientInterface.php index 4fc70e8..d42eb2d 100644 --- a/src/BatchClientInterface.php +++ b/src/BatchClientInterface.php @@ -22,7 +22,7 @@ interface BatchClientInterface * You may not assume that the requests are executed in a particular order. If the order matters * for your application, use sendRequest sequentially. * - * @param RequestInterface[] The requests to send + * @param RequestInterface[] $requests The requests to send * * @return BatchResult Containing one result per request * diff --git a/src/Exception/BatchException.php b/src/Exception/BatchException.php index 46d1e47..cbda665 100644 --- a/src/Exception/BatchException.php +++ b/src/Exception/BatchException.php @@ -24,6 +24,7 @@ final class BatchException extends TransferException public function __construct(BatchResult $result) { $this->result = $result; + parent::__construct(); } /** diff --git a/src/Plugin/ContentTypePlugin.php b/src/Plugin/ContentTypePlugin.php index f3944dd..c3fb25c 100644 --- a/src/Plugin/ContentTypePlugin.php +++ b/src/Plugin/ContentTypePlugin.php @@ -106,9 +106,6 @@ private function isJson(StreamInterface $stream): bool return JSON_ERROR_NONE === json_last_error(); } - /** - * @param $stream StreamInterface - */ private function isXml(StreamInterface $stream): bool { if (!function_exists('simplexml_load_string')) { diff --git a/src/PluginClient.php b/src/PluginClient.php index 8288445..7a44aab 100644 --- a/src/PluginClient.php +++ b/src/PluginClient.php @@ -25,7 +25,7 @@ final class PluginClient implements HttpClient, HttpAsyncClient /** * An HTTP async client. * - * @var HttpAsyncClient + * @var HttpAsyncClient|HttpClient */ private $client; diff --git a/src/PluginClientFactory.php b/src/PluginClientFactory.php index 6ae5091..3806e09 100644 --- a/src/PluginClientFactory.php +++ b/src/PluginClientFactory.php @@ -16,7 +16,7 @@ final class PluginClientFactory { /** - * @var callable + * @var callable|null */ private static $factory;