Skip to content

Commit 978cfc7

Browse files
authored
Dependency bumps (#40)
* updated symfony/psr-http-message-bridge dependency version * updated symfony/psr-http-message dependency version * updated league/openapi-psr7-validator dependency version
1 parent 276f7fa commit 978cfc7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
"require": {
2626
"php": "^8.0",
2727
"ext-json": "*",
28-
"league/openapi-psr7-validator": "^0.21",
28+
"league/openapi-psr7-validator": "^0.22",
2929
"nyholm/psr7": "^1.3.1",
3030
"psr/cache": "^1.0 || ^2.0 || ^3.0",
31-
"psr/http-message": "^1.0",
31+
"psr/http-message": "^1.0 || ^2.0",
3232
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
3333
"symfony/cache": "^5.0.9 || ^6.0 || ^7.0",
3434
"symfony/http-foundation": "^5.0.9 || ^6.0 || ^7.0",
35-
"symfony/psr-http-message-bridge": "^2.0.1 || ^7.0"
35+
"symfony/psr-http-message-bridge": "^2.0 || ^6.0 || ^7.0"
3636
},
3737
"require-dev": {
3838
"friendsofphp/php-cs-fixer": "^3.17",

tests/TestCase.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Nyholm\Psr7\Factory\Psr17Factory;
88
use Psr\Http\Message\ResponseInterface;
99
use Psr\Http\Message\ServerRequestInterface;
10+
use Psr\Http\Message\StreamInterface;
1011
use Symfony\Component\HttpFoundation\Request;
1112
use Symfony\Component\HttpFoundation\Response;
1213

@@ -42,7 +43,10 @@ protected function psr7Response(?array $content = null): ResponseInterface
4243
return $response;
4344
}
4445

45-
$response->method('getBody')->willReturn(json_encode($content, JSON_THROW_ON_ERROR));
46+
$body = $this->createMock(StreamInterface::class);
47+
$body->method('__toString')->willReturn(json_encode($content, JSON_THROW_ON_ERROR));
48+
49+
$response->method('getBody')->willReturn($body);
4650
$response->method('getStatusCode')->willReturn(Response::HTTP_OK);
4751
$response->method('getHeader')->willReturn(['application/json']);
4852

0 commit comments

Comments
 (0)