Skip to content

Commit 4124e8f

Browse files
fix: fix x-amzn-query-mode header (#3123)
* fix: fix x-amzn-query-mode header This change makes the `x-amzn-query-mode` header to be a string value instead of a boolean one. * chore: remove dynamic property creation Dynamic property creation is not supported in php 8.4+. * chore: add entry log change * Update fix-query-header-mode.json --------- Co-authored-by: Sean O'Brien <60306702+stobrien89@users.noreply.github.com>
1 parent 554d983 commit 4124e8f

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"type": "enhancement",
4+
"category": "",
5+
"description": "Sets the header `x-amzn-query-mode` to a string value instead of a boolean."
6+
}
7+
]

src/AwsClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ private function addQueryModeHeader(): void
540540
Middleware::mapRequest(function (RequestInterface $r) {
541541
return $r->withHeader(
542542
'x-amzn-query-mode',
543-
true
543+
"true"
544544
);
545545
}),
546546
'x-amzn-query-mode-header'

tests/AwsClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ public function testQueryModeHeaderAdded(): void
994994
$list->setHandler(new MockHandler([new Result()]));
995995
$list->appendSign(Middleware::tap(function ($cmd, $req) {
996996
$this->assertTrue($req->hasHeader('x-amzn-query-mode'));
997-
$this->assertEquals(true, $req->getHeaderLine('x-amzn-query-mode'));
997+
$this->assertEquals("true", $req->getHeaderLine('x-amzn-query-mode'));
998998
}));
999999
$client->TestOperation();
10001000
}

tests/Integ/CredentialsContext.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class CredentialsContext extends Assert implements
2020
private static $credentialsFile;
2121
private static $roleName;
2222
private static $roleArn;
23+
private $credentials;
24+
private $client;
2325

2426
/**
2527
* @BeforeFeature @credentials

0 commit comments

Comments
 (0)