From 2706543c79e8732c2942ad9566c613d0eec79c5e Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Thu, 6 Feb 2025 23:22:25 +1100 Subject: [PATCH] Make registered namespaces and optional param (#286) Signed-off-by: Kim Pepper --- src/OpenSearch/Client.php | 2 +- util/template/client-class | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenSearch/Client.php b/src/OpenSearch/Client.php index 260bc6b1..5334b5fb 100644 --- a/src/OpenSearch/Client.php +++ b/src/OpenSearch/Client.php @@ -315,7 +315,7 @@ class Client public function __construct( TransportInterface|Transport $transport, callable|EndpointFactoryInterface $endpointFactory, - array $registeredNamespaces, + array $registeredNamespaces = [], ) { if (!$transport instanceof TransportInterface) { @trigger_error('Passing an instance of \OpenSearch\Transport to ' . __METHOD__ . '() is deprecated in 2.4.0 and will be removed in 3.0.0. Pass an instance of \OpenSearch\TransportInterface instead.', E_USER_DEPRECATED); diff --git a/util/template/client-class b/util/template/client-class index d674152c..eef11ad3 100644 --- a/util/template/client-class +++ b/util/template/client-class @@ -78,7 +78,7 @@ class Client public function __construct( TransportInterface|Transport $transport, callable|EndpointFactoryInterface $endpointFactory, - array $registeredNamespaces, + array $registeredNamespaces = [], ) { if (!$transport instanceof TransportInterface) { @trigger_error('Passing an instance of \OpenSearch\Transport to ' . __METHOD__ . '() is deprecated in 2.4.0 and will be removed in 3.0.0. Pass an instance of \OpenSearch\TransportInterface instead.', E_USER_DEPRECATED);