From 659973c8a730ff5722b41a0ea94d2cd1dcd25391 Mon Sep 17 00:00:00 2001 From: Bodge-IT Date: Fri, 17 Jan 2025 08:42:11 +0000 Subject: [PATCH 1/3] Added typehints for new functions from #40613 --- libraries/src/Helper/TagsHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/src/Helper/TagsHelper.php b/libraries/src/Helper/TagsHelper.php index 56f7ded3b7a9..aa0ca13f73e0 100644 --- a/libraries/src/Helper/TagsHelper.php +++ b/libraries/src/Helper/TagsHelper.php @@ -825,7 +825,7 @@ public static function getTypes($arrayType = 'objectList', $selectTypes = null, * * @deprecated 5.3 will be removed in 7.0 */ - public function postStoreProcess(TableInterface $table, $newTags = [], $replace = true) + public function postStoreProcess(TableInterface $table, array $newTags = [], bool $replace = true): void { $this->postStore($table, $newTags, $replace); } @@ -843,7 +843,7 @@ public function postStoreProcess(TableInterface $table, $newTags = [], $replace * * @since __DEPLOY_VERSION__ */ - public function postStore(TableInterface $table, $newTags = [], $replace = true, $remove = false) + public function postStore(TableInterface $table, array $newTags = [], bool $replace = true, bool $remove = false): bool { if (!empty($table->newTags) && empty($newTags)) { $newTags = $table->newTags; From 4399bc1482f3ff273ac848862bc3eb473de0c6fe Mon Sep 17 00:00:00 2001 From: Gary Barclay <1881642+Bodge-IT@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:19:24 +0000 Subject: [PATCH 2/3] Update libraries/src/Helper/TagsHelper.php tx Harald Co-authored-by: Harald Leithner --- libraries/src/Helper/TagsHelper.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/src/Helper/TagsHelper.php b/libraries/src/Helper/TagsHelper.php index aa0ca13f73e0..674d50c7aa27 100644 --- a/libraries/src/Helper/TagsHelper.php +++ b/libraries/src/Helper/TagsHelper.php @@ -825,9 +825,12 @@ public static function getTypes($arrayType = 'objectList', $selectTypes = null, * * @deprecated 5.3 will be removed in 7.0 */ - public function postStoreProcess(TableInterface $table, array $newTags = [], bool $replace = true): void + public function postStoreProcess(TableInterface $table, $newTags = [], $replace = true): void { - $this->postStore($table, $newTags, $replace); + @trigger_error('7.0 Method postStoreProcess() is deprecated, use postStore() instead.', \E_USER_DEPRECATED); + + $this->postStore($table, (array) $newTags, (bool) $replace); + } } /** From 478e07dc195830d7f91a36e3b5417e2821d58a36 Mon Sep 17 00:00:00 2001 From: Gary Barclay <1881642+Bodge-IT@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:23:28 +0000 Subject: [PATCH 3/3] Update TagsHelper.php Removed additional "}" from reviewed code change --- libraries/src/Helper/TagsHelper.php | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/src/Helper/TagsHelper.php b/libraries/src/Helper/TagsHelper.php index 674d50c7aa27..fb8a36912be9 100644 --- a/libraries/src/Helper/TagsHelper.php +++ b/libraries/src/Helper/TagsHelper.php @@ -831,7 +831,6 @@ public function postStoreProcess(TableInterface $table, $newTags = [], $replace $this->postStore($table, (array) $newTags, (bool) $replace); } - } /** * Function that handles saving tags used in a table class after a store().