Skip to content

Commit 9de1495

Browse files
committed
psr version increase
1 parent fef018e commit 9de1495

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"require": {
44
"php": "^8.1",
55
"ext-json": "*",
6-
"psr/http-message": "^1.0",
7-
"psr/http-factory": "^1.0",
6+
"psr/http-message": "^1.1",
7+
"psr/http-factory": "^1.1",
88
"psr/http-server-handler": "^1.0",
99
"simple-as-fuck/php-validator": "^0.5.2|^0.6.0|^0.7.0",
1010
"guzzlehttp/guzzle": "^7.4",

test/Service/Client/DeprecationsLoggerTest.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare(strict_types=1);
44

55
use GuzzleHttp\Psr7\HttpFactory;
6+
use GuzzleHttp\Psr7\Response;
67
use PHPUnit\Framework\TestCase;
78
use Psr\Http\Message\ResponseInterface;
89
use Psr\Log\LoggerInterface;
@@ -44,34 +45,35 @@ public function testLogDeprecation(?string $expectedLogMessage, array $expectedC
4445
*/
4546
public static function dataProviderLogDeprecation(): array
4647
{
47-
$httpFactory = new HttpFactory();
48-
4948
return [
50-
[null, [], $httpFactory->createResponse()],
49+
[null, [], new Response()],
5150
[
5251
'Api: test method: GET uri: "https://test/" call is deprecated',
5352
[
5453
'Sunset' => '2022-12-15T21:46:37+00:00',
5554
'Link' => 'https://example.net/sunset',
5655
'Deprecated' => 'Some deprecated description',
5756
],
58-
$httpFactory->createResponse()
59-
->withHeader('Sunset', 'Thu, 15 Dec 2022 21:46:37 GMT')
60-
->withHeader('Link', '<https://example.net/sunset>;rel="sunset";type="text/html"')
61-
->withHeader('Deprecated', 'Some deprecated description')
62-
,
57+
new Response(
58+
headers: [
59+
'Sunset' => 'Thu, 15 Dec 2022 21:46:37 GMT',
60+
'Link' => '<https://example.net/sunset>;rel="sunset";type="text/html"',
61+
'Deprecated' => 'Some deprecated description',
62+
],
63+
),
6364
],
6465
[
6566
'Api: test method: GET uri: "https://test/" call is deprecated',
6667
[
6768
'Sunset' => 'Some sunset header with incorrect format',
6869
'Link' => 'Some sunset link with incorrect format',
6970
],
70-
$httpFactory->createResponse()
71-
->withHeader('Sunset', 'Some sunset header with incorrect format')
72-
->withHeader('Link', 'Some another link')
73-
->withHeader('Link', 'Some sunset link with incorrect format')
74-
,
71+
new Response(
72+
headers: [
73+
'Sunset' => 'Some sunset header with incorrect format',
74+
'Link' => 'Some sunset link with incorrect format',
75+
],
76+
),
7577
],
7678
];
7779
}

test/Service/Webhook/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testCallWebhooks(array $expectedRetryWebhooks, int $expectedCall
3434
$httpClient->method('request')->willReturnCallback(static function (string $method, string $uri, array $options) use (&$httpCalls): Response {
3535
$httpCalls++;
3636
$jsonObject = Validator::make($options)->array()->key(RequestOptions::JSON)->object();
37-
$value = $jsonObject->property('params')->object()->property('attributes')->array()->key(0)->object()->property('value')->nullable();
37+
$value = $jsonObject->property('params')->object()->property('attributes')->array()->key(0)->object()->property('value')->string()->nullable();
3838

3939
if ($value === 'fail') {
4040
throw new \RuntimeException();

0 commit comments

Comments
 (0)