diff --git a/.travis.yml b/.travis.yml index 07e21c9a..7ebc80af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ cache: env: global: - TEST_COMMAND="composer test" - - SYMFONY_PHPUNIT_VERSION="6.3" + - SYMFONY_PHPUNIT_VERSION="6.5" - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" branches: diff --git a/Collector/ProfileClient.php b/Collector/ProfileClient.php index 6b414dbc..b79f2e63 100644 --- a/Collector/ProfileClient.php +++ b/Collector/ProfileClient.php @@ -3,6 +3,7 @@ namespace Http\HttplugBundle\Collector; use Http\Client\Common\FlexibleHttpClient; +use Http\Client\Common\VersionBridgeClient; use Http\Client\Exception\HttpException; use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; @@ -21,6 +22,8 @@ */ class ProfileClient implements HttpClient, HttpAsyncClient { + use VersionBridgeClient; + /** * @var HttpClient|HttpAsyncClient */ @@ -114,10 +117,7 @@ public function sendAsyncRequest(RequestInterface $request) } } - /** - * {@inheritdoc} - */ - public function sendRequest(RequestInterface $request) + protected function doSendRequest(RequestInterface $request) { $stack = $this->collector->getActiveStack(); if (null === $stack) { diff --git a/Collector/ProfilePlugin.php b/Collector/ProfilePlugin.php index c18ac3ec..b83da5f1 100644 --- a/Collector/ProfilePlugin.php +++ b/Collector/ProfilePlugin.php @@ -17,6 +17,8 @@ */ class ProfilePlugin implements Plugin { + use Plugin\VersionBridgePlugin; + /** * @var Plugin */ @@ -44,10 +46,7 @@ public function __construct(Plugin $plugin, Collector $collector, Formatter $for $this->formatter = $formatter; } - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { $profile = new Profile(get_class($this->plugin)); diff --git a/Collector/StackPlugin.php b/Collector/StackPlugin.php index 5e2da321..0bb527d5 100644 --- a/Collector/StackPlugin.php +++ b/Collector/StackPlugin.php @@ -17,6 +17,8 @@ */ class StackPlugin implements Plugin { + use Plugin\VersionBridgePlugin; + /** * @var Collector */ @@ -44,10 +46,7 @@ public function __construct(Collector $collector, Formatter $formatter, $client) $this->client = $client; } - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { $stack = new Stack($this->client, $this->formatter->formatRequest($request)); diff --git a/Tests/Functional/ProfilingTest.php b/Tests/Functional/ProfilingTest.php index 60f9d40b..be126957 100644 --- a/Tests/Functional/ProfilingTest.php +++ b/Tests/Functional/ProfilingTest.php @@ -122,10 +122,9 @@ private function createClient(array $plugins, $clientName = 'Acme', array $clien class ExceptionThrowerPlugin implements Plugin { - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + use Plugin\VersionBridgePlugin; + + protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { throw new \Exception(); } diff --git a/composer.json b/composer.json index fc7748d0..23a028a8 100644 --- a/composer.json +++ b/composer.json @@ -17,22 +17,22 @@ ], "require": { "php": "^5.5 || ^7.0", - "php-http/client-common": "^1.6 || ^2.0", + "php-http/client-common": "^1.9 || ^2.0", "php-http/client-implementation": "^1.0", - "php-http/cache-plugin": "^1.4", + "php-http/cache-plugin": "^1.6", "php-http/discovery": "^1.0", "php-http/httplug": "^1.0 || ^2.0", - "php-http/logger-plugin": "^1.0", + "php-http/logger-plugin": "^1.1", "php-http/message": "^1.4", "php-http/message-factory": "^1.0.2", - "php-http/stopwatch-plugin": "^1.0", + "php-http/stopwatch-plugin": "^1.2", "psr/http-message": "^1.0", - "symfony/config": "^2.8 || ^3.0 || ^4.0", - "symfony/dependency-injection": "^2.8.3 || ^3.0.3 || ^4.0", - "symfony/event-dispatcher": "^2.8 || ^3.0 || ^4.0", - "symfony/http-kernel": "^2.8 || ^3.0 || ^4.0", - "symfony/options-resolver": "^2.8 || ^3.0 || ^4.0", - "twig/twig": "^1.18 || ^2.0" + "symfony/config": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/dependency-injection": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/event-dispatcher": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/http-kernel": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/options-resolver": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "twig/twig": "^1.36 || ^2.6" }, "require-dev": { "guzzlehttp/psr7": "^1.0", @@ -46,15 +46,15 @@ "php-http/react-adapter": "^0.2.1", "php-http/socket-client": "^1.0", "polishsymfonycommunity/symfony-mocker-container": "^1.0", - "symfony/browser-kit": "^2.8 || ^3.0 || ^4.0", - "symfony/cache": "^3.1 || ^4.0", - "symfony/dom-crawler": "^2.8 || ^3.0 || ^4.0", + "symfony/browser-kit": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/cache": "^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/dom-crawler": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", "symfony/framework-bundle": "^2.8.1 || ^3.0.1 || ^4.0", - "symfony/http-foundation": "^2.8 || ^3.0 || ^4.0", - "symfony/phpunit-bridge": "^3.3 || ^4.0", - "symfony/stopwatch": "^2.8 || ^3.0 || ^4.0", - "symfony/twig-bundle": "^2.8 || ^3.0 || ^4.0", - "symfony/web-profiler-bundle": "^2.8 || ^3.0 || ^4.0" + "symfony/http-foundation": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/phpunit-bridge": "^3.4 || ^4.2", + "symfony/stopwatch": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/twig-bundle": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1", + "symfony/web-profiler-bundle": "^2.8.49 || ^3.0.9 || ^3.1.10 || ^3.2.14 || ^3.3.18 || ^3.4.20 || ^4.0.15 || ^4.1.9 || ^4.2.1" }, "conflict": { "php-http/guzzle6-adapter": "<1.1" @@ -83,5 +83,7 @@ "branch-alias": { "dev-master": "1.x-dev" } - } + }, + "prefer-stable": true, + "minimum-stability": "dev" }