-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Migrate away from OC_App to IAppManager #47927
Conversation
07141d5
to
2abf2d8
Compare
…_App Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2abf2d8
to
7a16d01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup!
$apps = array_unique($apps); | ||
|
||
return $apps; | ||
return \OCP\Server::get(IAppManager::class)->getAllAppsInAppsFolders(); | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also deprecate this in favor of \OCP\Support\Subscription\IRegistry::delegateGetSupportedApps
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would do the opposite 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the opposite?
@susnux yeah we should. But I won’t do it in this PR to keep it mergeable. This kind of cleanup needs to be merged quickly or it conflicts fast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the opposite?
From my perspective the subscription methods are "internal" and are used by (other) public components.
All the delegate*() functions are only called from "lib/private/ implementing public interfaces", settings app, support app or update checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe getSupportedApps can be moved to the AppManager then.
In the mean time, would one of you two approve this here PR? :-P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹
Follow-up of #44025
Summary
Migrate most calls of
OC_App::getAppPath
,OC_App::cleanAppId
,OC_App::getAllApps
to calls on the AppManager instance. The later two were added to the OCP interface for the occasion.Checklist