From fb917c495b00348de6d57ab7ddf612de70ad9427 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Wed, 4 Dec 2024 16:00:20 +0100 Subject: fix(ocp): Deprecate getInstalledApps and replace with clearer method name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/App/AppManager.php | 11 ++++++++++- lib/public/App/IAppManager.php | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 2603b03ee84..d71fb5f74c2 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -149,11 +149,20 @@ class AppManager implements IAppManager { } /** - * List all installed apps + * Deprecated alias * * @return string[] */ public function getInstalledApps() { + return $this->getEnabledApps(); + } + + /** + * List all enabled apps, either for everyone or for some groups + * + * @return list + */ + public function getEnabledApps(): array { return array_keys($this->getInstalledAppsValues()); } diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php index ee090bcff9d..961823dee6e 100644 --- a/lib/public/App/IAppManager.php +++ b/lib/public/App/IAppManager.php @@ -79,14 +79,14 @@ interface IAppManager { * @param string $appId * @return bool * @since 8.0.0 - * @deprecated 31.0.0 Use either {@see self::isEnabledForUser} or {@see self::isEnabledForAnyone} + * @deprecated 32.0.0 Use either {@see self::isEnabledForUser} or {@see self::isEnabledForAnyone} */ public function isInstalled($appId); /** * Check if an app is enabled in the instance, either for everyone or for specific groups * - * @since 31.0.0 + * @since 32.0.0 */ public function isEnabledForAnyone(string $appId): bool; @@ -186,9 +186,18 @@ interface IAppManager { * * @return string[] * @since 8.1.0 + * @deprecated 32.0.0 Use either {@see self::getEnabledApps} or {@see self::getEnabledAppsForUser} */ public function getInstalledApps(); + /** + * List all apps enabled, either for everyone or for specific groups only + * + * @return list + * @since 32.0.0 + */ + public function getEnabledApps(): array; + /** * Clear the cached list of apps when enabling/disabling an app * @since 8.1.0 -- cgit v1.2.3