Browse Source

fix(ocp): Deprecate getInstalledApps and replace with clearer method name

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/49648/head
Côme Chilliet 1 year ago
parent
commit
fb917c495b
No known key found for this signature in database GPG Key ID: A3E2F658B28C760A
  1. 11
      lib/private/App/AppManager.php
  2. 13
      lib/public/App/IAppManager.php

11
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<string>
*/
public function getEnabledApps(): array {
return array_keys($this->getInstalledAppsValues());
}

13
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<string>
* @since 32.0.0
*/
public function getEnabledApps(): array;
/**
* Clear the cached list of apps when enabling/disabling an app
* @since 8.1.0

Loading…
Cancel
Save