Skip to content

Commit 277047a

Browse files
committed
Support both client-common ^1.9 and 2.x
1 parent 6a96192 commit 277047a

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=5.4",
14+
"php": "^5.4 || ^7.0",
1515
"psr/log": "^1.0",
16-
"php-http/client-common": "^1.1",
16+
"php-http/client-common": "^1.9 || ^2.0",
1717
"php-http/message": "^1.0"
1818
},
1919
"require-dev": {

src/LoggerPlugin.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @author Joel Wurtz <[email protected]>
1717
*/
18-
final class LoggerPlugin implements Plugin
18+
final class LoggerPlugin extends VersionBridgePlugin
1919
{
2020
private $logger;
2121

@@ -27,10 +27,7 @@ public function __construct(LoggerInterface $logger, Formatter $formatter = null
2727
$this->formatter = $formatter ?: new SimpleFormatter();
2828
}
2929

30-
/**
31-
* {@inheritdoc}
32-
*/
33-
public function handleRequest(RequestInterface $request, callable $next, callable $first)
30+
protected function doHandleRequest(RequestInterface $request, callable $next, callable $first)
3431
{
3532
$start = microtime(true);
3633
$this->logger->info(sprintf("Sending request:\n%s", $this->formatter->formatRequest($request)), ['request' => $request]);

0 commit comments

Comments
 (0)