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 8abfcf0..1e91db4 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ } ], "require": { - "php": ">=5.4", + "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": { @@ -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]);