From 08e4d8f1949a3164a4257a2448c4f50b35275bd8 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 21 Jan 2023 15:32:21 -0500 Subject: [PATCH] APIv4 - Show actions as deprecated in the Explorer --- Civi/Api4/Action/GetActions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Civi/Api4/Action/GetActions.php b/Civi/Api4/Action/GetActions.php index 5f3dbd9a61..b88db07ca4 100644 --- a/Civi/Api4/Action/GetActions.php +++ b/Civi/Api4/Action/GetActions.php @@ -93,7 +93,7 @@ class GetActions extends BasicGetAction { if (strpos($method->getDocComment(), '@inheritDoc') !== FALSE && !empty($methodDocs['comment']) && !empty($actionDocs['comment'])) { $methodDocs['comment'] .= "\n\n" . $actionDocs['comment']; } - $actionDocs = array_filter($methodDocs) + $actionDocs; + $actionDocs = array_filter($methodDocs) + $actionDocs + ['deprecated' => FALSE]; } $this->_actions[$actionName] += $actionDocs; } @@ -131,6 +131,10 @@ class GetActions extends BasicGetAction { 'description' => 'List of all accepted parameters', 'data_type' => 'Array', ], + [ + 'name' => 'deprecated', + 'data_type' => 'Boolean', + ], ]; } -- 2.25.1