From c7ee01c132019604b89483ef1b714ee27cc94138 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 28 Dec 2018 10:37:37 +0100 Subject: [PATCH 1/3] Support client common 2.0 --- composer.json | 1 + src/StopwatchPlugin.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 76424fb..18496e4 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ }, "extra": { "branch-alias": { + "dev-2.x": "2.x-dev", "dev-master": "1.0-dev" } }, diff --git a/src/StopwatchPlugin.php b/src/StopwatchPlugin.php index 8e3054a..71e11c5 100644 --- a/src/StopwatchPlugin.php +++ b/src/StopwatchPlugin.php @@ -4,6 +4,7 @@ use Http\Client\Common\Plugin; use Http\Client\Exception; +use Http\Promise\Promise; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use Symfony\Component\Stopwatch\Stopwatch; @@ -33,7 +34,7 @@ public function __construct(Stopwatch $stopwatch) /** * {@inheritdoc} */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $eventName = $this->getStopwatchEventName($request); $this->stopwatch->start($eventName, self::CATEGORY); From ff5f8c3cd581c6bf42228e29d923260fe83b4284 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 28 Dec 2018 10:46:37 +0100 Subject: [PATCH 2/3] Drop PHP5 --- .travis.yml | 10 ++-------- composer.json | 6 +++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf50516..21525cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,23 +17,17 @@ matrix: fast_finish: true include: # Test with lowest dependencies - - php: 7.1 + - php: 7.3 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" - - php: 5.4 + - php: 7.1 env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak" # Test the latest stable release - - php: 5.4 - - php: 5.5 - - php: 5.6 - - php: 7.0 - php: 7.1 - php: 7.2 env: COVERAGE=true TEST_COMMAND="composer test-ci" DEPENDENCIES="henrikbjorn/phpspec-code-coverage:^1.0" # Force some major versions of Symfony - - php: 7.2 - env: DEPENDENCIES="dunglas/symfony-lock:^2" - php: 7.2 env: DEPENDENCIES="dunglas/symfony-lock:^3" - php: 7.2 diff --git a/composer.json b/composer.json index 18496e4..a45608d 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ } ], "require": { - "php": ">=5.4", - "symfony/stopwatch": "^2.7|^3.0|^4.0", + "php": "^7.1", + "symfony/stopwatch": "^3.4 || ^4.0", "php-http/client-common": "^1.1" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.0 || ^4.0" + "phpspec/phpspec": "^4.0" }, "autoload": { "psr-4": { From f24b6c26b0fd6a8673c76e5dc92e989952632611 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 28 Dec 2018 10:48:58 +0100 Subject: [PATCH 3/3] client common 2.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a45608d..388e748 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^7.1", "symfony/stopwatch": "^3.4 || ^4.0", - "php-http/client-common": "^1.1" + "php-http/client-common": "^2.0" }, "require-dev": { "phpspec/phpspec": "^4.0"