Skip to content

Commit

Permalink
Add a proxy for closeCursor for backwards-compatibility.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Aug 12, 2024
1 parent 7d46b11 commit fe19a01
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion util/ClientEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function renderClass(): string
$useNamespace = '';

// The following namespaces do not have OpenSearch API specifications
$patchnamespaces = ['async_search', 'searchable_snapshots', 'ssl', 'sql', 'data_frame_transform_deprecated', 'monitoring'];
$patchnamespaces = ['async_search', 'searchable_snapshots', 'ssl', 'data_frame_transform_deprecated', 'monitoring'];
$this->namespace = array_unique(array_merge($this->namespace, $patchnamespaces));
sort($this->namespace);

Expand Down
12 changes: 12 additions & 0 deletions util/EndpointProxies/sql/closeCursorProxy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

return <<<'EOD'
/**
* Proxy function to closeCursor() to prevent BC break.
* This API will be removed in a future version. Use 'close' API instead.
*/
public function closeCursor(array $params = [])
{
return $this->close($params);
}
EOD;

0 comments on commit fe19a01

Please sign in to comment.