Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify app manager method names #49648

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(ocp): Deprecate getInstalledApps and replace with clearer method …
…name

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Dec 4, 2024
commit f1d664082d02e0d6719525edbe55168a3b2fb78e
11 changes: 10 additions & 1 deletion lib/private/App/AppManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,20 @@ private function getInstalledAppsValues(): array {
}

/**
* 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());
}

Expand Down
9 changes: 9 additions & 0 deletions lib/public/App/IAppManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,18 @@ public function getEnabledAppsForUser(IUser $user);
*
* @return string[]
* @since 8.1.0
* @deprecated 31.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 31.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @since 31.0
* @since 31.0.0

*/
public function getEnabledApps(): array;

/**
* Clear the cached list of apps when enabling/disabling an app
* @since 8.1.0
Expand Down