Skip to content

Commit 34a4858

Browse files
authored
Merge pull request #37 from ejunker/php84
Fix PHP 8.4 deprecations
2 parents a257d71 + 05bca4d commit 34a4858

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/CosmosDb.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public function getDocument(string $rid_id, string $rid_col, string $rid_doc): s
528528
* @return string JSON response
529529
* @throws GuzzleException
530530
*/
531-
public function createDocument(string $rid_id, string $rid_col, string $json, string $partitionKey = null, array $headers = []): string
531+
public function createDocument(string $rid_id, string $rid_col, string $json, ?string $partitionKey = null, array $headers = []): string
532532
{
533533
$authHeaders = $this->getAuthHeaders('POST', 'docs', $rid_col);
534534
$headers = \array_merge($headers, $authHeaders);
@@ -554,7 +554,7 @@ public function createDocument(string $rid_id, string $rid_col, string $json, st
554554
* @return string JSON response
555555
* @throws GuzzleException
556556
*/
557-
public function replaceDocument(string $rid_id, string $rid_col, string $rid_doc, string $json, string $partitionKey = null, array $headers = []): string
557+
public function replaceDocument(string $rid_id, string $rid_col, string $rid_doc, string $json, ?string $partitionKey = null, array $headers = []): string
558558
{
559559
$authHeaders = $this->getAuthHeaders('PUT', 'docs', $rid_doc);
560560
$headers = \array_merge($headers, $authHeaders);
@@ -580,7 +580,7 @@ public function replaceDocument(string $rid_id, string $rid_col, string $rid_doc
580580
* @return string JSON response
581581
* @throws GuzzleException
582582
*/
583-
public function patchDocument(string $rid_id, string $rid_col, string $rid_doc, string $json, string $partitionKey = null, array $headers = []): string
583+
public function patchDocument(string $rid_id, string $rid_col, string $rid_doc, string $json, ?string $partitionKey = null, array $headers = []): string
584584
{
585585
$authHeaders = $this->getAuthHeaders('PATCH', 'docs', $rid_doc);
586586
$headers = \array_merge($headers, $authHeaders);
@@ -606,7 +606,7 @@ public function patchDocument(string $rid_id, string $rid_col, string $rid_doc,
606606
* @return string JSON response
607607
* @throws GuzzleException
608608
*/
609-
public function deleteDocument(string $rid_id, string $rid_col, string $rid_doc, string $partitionKey = null, array $headers = []): string
609+
public function deleteDocument(string $rid_id, string $rid_col, string $rid_doc, ?string $partitionKey = null, array $headers = []): string
610610
{
611611
$authHeaders = $this->getAuthHeaders('DELETE', 'docs', $rid_doc);
612612
$headers = \array_merge($headers, $authHeaders);

src/CosmosDbDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function selectCollection(string $col_name): CosmosDbCollection|null
4242
* @return CosmosDbCollection|null
4343
* @throws GuzzleException
4444
*/
45-
public function createCollection(string $col_name, string $partitionKey = null): CosmosDbCollection|null
45+
public function createCollection(string $col_name, ?string $partitionKey = null): CosmosDbCollection|null
4646
{
4747
$col_body = ["id" => $col_name];
4848
if ($partitionKey) {

0 commit comments

Comments
 (0)