diff --git a/.travis.yml b/.travis.yml index dee74e0..2c7a0b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 + - 7.3 env: global: @@ -26,8 +28,8 @@ matrix: include: - php: 5.4 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" - - php: hhvm - dist: trusty + - php: 7.1 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" before_install: - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi @@ -35,7 +37,7 @@ before_install: install: # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction script: - $TEST_COMMAND diff --git a/composer.json b/composer.json index d875cdb..355e82a 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^5.4 || ^7.0", "psr/cache": "^1.0", - "php-http/client-common": "^1.1", + "php-http/client-common": "^1.9 || ^2.0", "php-http/message-factory": "^1.0", "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" }, @@ -39,5 +39,7 @@ "branch-alias": { "dev-master": "1.6-dev" } - } + }, + "prefer-stable": true, + "minimum-stability": "dev" } diff --git a/src/CachePlugin.php b/src/CachePlugin.php index 8225b75..5ca9b6d 100644 --- a/src/CachePlugin.php +++ b/src/CachePlugin.php @@ -23,6 +23,8 @@ */ final class CachePlugin implements Plugin { + use VersionBridgePlugin; + /** * @var CacheItemPoolInterface */ @@ -124,10 +126,7 @@ public static function serverCache(CacheItemPoolInterface $pool, StreamFactory $ return new self($pool, $streamFactory, $config); } - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { $method = strtoupper($request->getMethod()); // if the request not is cachable, move to $next