From f1bafcfca22165b7d78fa69a4b2ff375e8c54d90 Mon Sep 17 00:00:00 2001 From: osteel Date: Fri, 12 Jan 2024 14:52:11 +0000 Subject: [PATCH 1/4] updated symfony/psr-http-message-bridge dependency version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7ac3191..f00f06a 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "psr/simple-cache": "^1.0 || ^2.0 || ^3.0", "symfony/cache": "^5.0.9 || ^6.0 || ^7.0", "symfony/http-foundation": "^5.0.9 || ^6.0 || ^7.0", - "symfony/psr-http-message-bridge": "^2.0.1 || ^7.0" + "symfony/psr-http-message-bridge": "^2.0 || ^6.0 || ^7.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.17", From fc6489318f63d5e05712a50ef5295baa09c0515a Mon Sep 17 00:00:00 2001 From: osteel Date: Fri, 12 Jan 2024 14:58:06 +0000 Subject: [PATCH 2/4] updated symfony/psr-http-message dependency version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f00f06a..c8462b9 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "league/openapi-psr7-validator": "^0.21", "nyholm/psr7": "^1.3.1", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "psr/simple-cache": "^1.0 || ^2.0 || ^3.0", "symfony/cache": "^5.0.9 || ^6.0 || ^7.0", "symfony/http-foundation": "^5.0.9 || ^6.0 || ^7.0", From 8c43d8e36ad5a39ae7b34e7e0a76443a0591a14a Mon Sep 17 00:00:00 2001 From: osteel Date: Fri, 12 Jan 2024 15:00:18 +0000 Subject: [PATCH 3/4] updated league/openapi-psr7-validator dependency version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c8462b9..6806ef4 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^8.0", "ext-json": "*", - "league/openapi-psr7-validator": "^0.21", + "league/openapi-psr7-validator": "^0.22", "nyholm/psr7": "^1.3.1", "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/http-message": "^1.0 || ^2.0", From 94c6c947f173252fddb5e34028f268c97bcb8f46 Mon Sep 17 00:00:00 2001 From: osteel Date: Fri, 12 Jan 2024 15:34:19 +0000 Subject: [PATCH 4/4] fixed tests --- tests/TestCase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 2aaece9..9ea7361 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -7,6 +7,7 @@ use Nyholm\Psr7\Factory\Psr17Factory; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Message\StreamInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -42,7 +43,10 @@ protected function psr7Response(?array $content = null): ResponseInterface return $response; } - $response->method('getBody')->willReturn(json_encode($content, JSON_THROW_ON_ERROR)); + $body = $this->createMock(StreamInterface::class); + $body->method('__toString')->willReturn(json_encode($content, JSON_THROW_ON_ERROR)); + + $response->method('getBody')->willReturn($body); $response->method('getStatusCode')->willReturn(Response::HTTP_OK); $response->method('getHeader')->willReturn(['application/json']);