diff --git a/.travis.yml b/.travis.yml index bf50516..81e8617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,7 @@ matrix: - php: 7.1 - php: 7.2 env: COVERAGE=true TEST_COMMAND="composer test-ci" DEPENDENCIES="henrikbjorn/phpspec-code-coverage:^1.0" + - php: 7.3 # Force some major versions of Symfony - php: 7.2 diff --git a/composer.json b/composer.json index 76424fb..7392322 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ } ], "require": { - "php": ">=5.4", - "symfony/stopwatch": "^2.7|^3.0|^4.0", - "php-http/client-common": "^1.1" + "php": "^5.4 || ^7.0", + "symfony/stopwatch": "^2.7 || ^3.0 || ^4.0", + "php-http/client-common": "^1.9 || ^2.0" }, "require-dev": { "phpspec/phpspec": "^2.5 || ^3.0 || ^4.0" @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.2-dev" } }, "prefer-stable": true, diff --git a/src/StopwatchPlugin.php b/src/StopwatchPlugin.php index 8e3054a..5e574a5 100644 --- a/src/StopwatchPlugin.php +++ b/src/StopwatchPlugin.php @@ -17,6 +17,8 @@ final class StopwatchPlugin implements Plugin { const CATEGORY = 'php_http.request'; + use VersionBridgePlugin; + /** * @var Stopwatch */ @@ -30,10 +32,7 @@ public function __construct(Stopwatch $stopwatch) $this->stopwatch = $stopwatch; } - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { $eventName = $this->getStopwatchEventName($request); $this->stopwatch->start($eventName, self::CATEGORY);