diff --git a/.travis.yml b/.travis.yml index dee74e0..0199d6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,9 @@ cache: - $HOME/.composer/cache/files php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - 7.1 + - 7.2 + - 7.3 env: global: @@ -24,10 +22,8 @@ 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" - - php: hhvm - dist: trusty before_install: - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi diff --git a/composer.json b/composer.json index d875cdb..99ffff0 100644 --- a/composer.json +++ b/composer.json @@ -11,11 +11,11 @@ } ], "require": { - "php": "^5.4 || ^7.0", + "php": "^7.1", "psr/cache": "^1.0", - "php-http/client-common": "^1.1", + "php-http/client-common": "^2.0", "php-http/message-factory": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" + "symfony/options-resolver": "^3.4 || ^4.0" }, "require-dev": { "phpspec/phpspec": "^2.5", @@ -37,6 +37,7 @@ }, "extra": { "branch-alias": { + "dev-2.x": "2.x-dev", "dev-master": "1.6-dev" } } diff --git a/src/CachePlugin.php b/src/CachePlugin.php index 8225b75..bbf5294 100644 --- a/src/CachePlugin.php +++ b/src/CachePlugin.php @@ -9,6 +9,7 @@ use Http\Client\Common\Plugin\Cache\Listener\CacheListener; use Http\Message\StreamFactory; use Http\Promise\FulfilledPromise; +use Http\Promise\Promise; use Psr\Cache\CacheItemInterface; use Psr\Cache\CacheItemPoolInterface; use Psr\Http\Message\RequestInterface; @@ -127,7 +128,7 @@ public static function serverCache(CacheItemPoolInterface $pool, StreamFactory $ /** * {@inheritdoc} */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $method = strtoupper($request->getMethod()); // if the request not is cachable, move to $next