From c4540df5ea38824d12975587601671bb5795fa82 Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Thu, 14 Nov 2024 06:25:03 +1100 Subject: [PATCH] Added changelog and deprecation trigger Signed-off-by: Kim Pepper --- CHANGELOG.md | 1 + src/OpenSearch/ClientBuilder.php | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d143b19a..8b253af6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Increased min version of `ezimuel/ringphp` to `^1.2.2` - Changed fluent setters to return static ### Deprecated +- Passing a callable to for retrieving endpoints is deprecated and replaced with passing an EndpointFactory ([#237](https://github.com/opensearch-project/opensearch-php/pull/237)) ### Removed ### Fixed - Fixed PHP 8.4 deprecations diff --git a/src/OpenSearch/ClientBuilder.php b/src/OpenSearch/ClientBuilder.php index f8f5bef5..a075e36f 100644 --- a/src/OpenSearch/ClientBuilder.php +++ b/src/OpenSearch/ClientBuilder.php @@ -186,6 +186,7 @@ public function getTransport(): Transport */ public function getEndpoint(): callable { + @trigger_error(__METHOD__ . '() is deprecated in 2.3.2 and will be removed in 3.0.0. Use \OpenSearch\ClientBuilder::getEndpointFactory() instead.', E_USER_DEPRECATED); return fn ($c) => $this->endpointFactory->getEndpoint('OpenSearch\\Endpoints\\' . $c); }