Skip to content

Commit

Permalink
Bump minimum versions (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryPEGEOT authored Nov 21, 2020
1 parent 1b98d32 commit e20f109
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ cache:
- $HOME/.composer/cache/files

php:
- 7.1
- 7.2
- 7.3
- 7.4
Expand All @@ -23,7 +22,7 @@ branches:
matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.2
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.4
env: COMPOSER_FLAGS="--prefer-stable" COVERAGE=true TEST_COMMAND="composer test-ci"
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
}
],
"require": {
"php": "^7.1",
"guzzlehttp/psr7": "^1.4",
"php": "^7.2",
"guzzlehttp/psr7": "^1.7",
"php-http/client-common": "^2.0",
"psr/log": "^1.1",
"symfony/filesystem": "^3.4|^4.0|^5.0",
Expand Down
6 changes: 3 additions & 3 deletions src/Recorder/FilesystemRecorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Http\Client\Plugin\Vcr\Recorder;

use GuzzleHttp\Psr7;
use GuzzleHttp\Psr7\Message;
use Psr\Http\Message\ResponseInterface;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
Expand Down Expand Up @@ -74,15 +74,15 @@ public function replay(string $name): ?ResponseInterface
throw new \RuntimeException(sprintf('Unable to read "%s" file content', $filename));
}

return Psr7\parse_response($content);
return Message::parseResponse($content);
}

public function record(string $name, ResponseInterface $response): void
{
$filename = "{$this->directory}$name.txt";
$context = compact('name', 'filename');

if (null === $content = preg_replace(array_keys($this->filters), array_values($this->filters), Psr7\str($response))) {
if (null === $content = preg_replace(array_keys($this->filters), array_values($this->filters), Message::toString($response))) {
throw new \RuntimeException('Some of the provided response filters are invalid.');
}

Expand Down

0 comments on commit e20f109

Please sign in to comment.