From dd66a8774ba75e8a657268aa205e8049d7f76da8 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 28 Dec 2018 10:36:00 +0100 Subject: [PATCH 1/3] Support client common 2.0 --- composer.json | 1 + src/LoggerPlugin.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8abfcf0..bfc5c6b 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,7 @@ }, "extra": { "branch-alias": { + "dev-2.x": "2.x-dev", "dev-master": "1.0-dev" } }, diff --git a/src/LoggerPlugin.php b/src/LoggerPlugin.php index 1797d7f..43207e4 100644 --- a/src/LoggerPlugin.php +++ b/src/LoggerPlugin.php @@ -6,6 +6,7 @@ use Http\Client\Exception; use Http\Message\Formatter; use Http\Message\Formatter\SimpleFormatter; +use Http\Promise\Promise; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Psr\Log\LoggerInterface; @@ -30,7 +31,7 @@ public function __construct(LoggerInterface $logger, Formatter $formatter = null /** * {@inheritdoc} */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $start = microtime(true); $this->logger->info(sprintf("Sending request:\n%s", $this->formatter->formatRequest($request)), ['request' => $request]); From 0e890064bbd4ea94cd194fc5161211f93bf695d4 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 28 Dec 2018 10:46:37 +0100 Subject: [PATCH 2/3] Drop PHP5 --- .travis.yml | 6 +----- composer.json | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index dad7ea5..105314f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,6 @@ cache: - $HOME/.composer/cache/files php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - 7.1 - 7.2 - 7.3 @@ -26,7 +22,7 @@ branches: matrix: fast_finish: true include: - - php: 5.4 + - php: 7.1 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" before_install: diff --git a/composer.json b/composer.json index bfc5c6b..527b714 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ } ], "require": { - "php": ">=5.4", + "php": "^7.1", "psr/log": "^1.0", "php-http/client-common": "^1.1", "php-http/message": "^1.0" From 9ec777a4879e8fbb42629ad65ac56997208e9ff5 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 28 Dec 2018 10:48:59 +0100 Subject: [PATCH 3/3] client common 2.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 527b714..1e91db4 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^7.1", "psr/log": "^1.0", - "php-http/client-common": "^1.1", + "php-http/client-common": "^2.0", "php-http/message": "^1.0" }, "require-dev": {