From fb4348e3bc5d4f2dc9bc50f73788f7dcccc9b95c Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 1 Oct 2025 12:05:32 +0200 Subject: [PATCH] fix(IUserManager): Fix deprecation of search method Signed-off-by: provokateurin --- build/psalm-baseline.xml | 63 ++++++++++++++++++++++++++++++++---- lib/private/User/Manager.php | 9 ------ lib/public/IUserManager.php | 1 + 3 files changed, 58 insertions(+), 15 deletions(-) diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 92479b887aa..839861094f0 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -701,6 +701,9 @@ + + + @@ -714,8 +717,7 @@ - - + getPrincipalPropertiesByPath($path)]]> @@ -1282,6 +1284,7 @@ + @@ -1499,9 +1502,6 @@ - - - @@ -1843,6 +1843,8 @@ + + @@ -2254,7 +2256,6 @@ - @@ -2621,6 +2622,11 @@ + + + + + @@ -2743,6 +2749,11 @@ + + + + + @@ -2768,6 +2779,9 @@ + + + @@ -2783,6 +2797,11 @@ + + + + + @@ -2824,6 +2843,21 @@ + + + + + + + + + + + + + + + getUID())]]> @@ -2831,10 +2865,27 @@ + + + + + + + + + + + + + + + + + diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 028ee87b40b..765e8fa3d7b 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -252,15 +252,6 @@ class Manager extends PublicEmitter implements IUserManager { return false; } - /** - * Search by user id - * - * @param string $pattern - * @param int $limit - * @param int $offset - * @return IUser[] - * @deprecated 27.0.0, use searchDisplayName instead - */ public function search($pattern, $limit = null, $offset = null) { $users = []; foreach ($this->backends as $backend) { diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php index a4b70327e1e..973e1c5ef40 100644 --- a/lib/public/IUserManager.php +++ b/lib/public/IUserManager.php @@ -104,6 +104,7 @@ interface IUserManager { * @param int $offset * @return \OCP\IUser[] * @since 8.0.0 + * @deprecated 27.0.0, use searchDisplayName instead */ public function search($pattern, $limit = null, $offset = null);