Skip to content

Commit b924cf6

Browse files
authored
Merge pull request #413 from php-http/adjust-formatter
implement formatResponseForRequest
2 parents 2b5dd81 + ec92e1b commit b924cf6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: .github/workflows/continuous-integration.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
php-version: "7.3"
2424
dependency-versions: "lowest"
2525
symfony-deprecations-helper: "weak"
26+
stability: "stable"
2627

2728
# Test the latest stable release
2829
- dependencies: "php-http/guzzle7-adapter php-http/vcr-plugin:^1.0@dev"

Diff for: src/Collector/Formatter.php

+9
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ public function formatRequest(RequestInterface $request)
6565
return $this->formatter->formatRequest($request);
6666
}
6767

68+
public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request)
69+
{
70+
if (method_exists($this->formatter, 'formatResponseForRequest')) {
71+
return $this->formatter->formatResponseForRequest($response, $request);
72+
}
73+
74+
return $this->formatter->formatResponse($response);
75+
}
76+
6877
/**
6978
* {@inheritdoc}
7079
*/

0 commit comments

Comments
 (0)