Skip to content

Migrate away from OC_App to IAppManager - #47927

Merged
come-nc merged 3 commits into
masterfrom
fix/migrate-away-from-oc_app
Sep 13, 2024
Merged

Migrate away from OC_App to IAppManager#47927
come-nc merged 3 commits into
masterfrom
fix/migrate-away-from-oc_app

Conversation

@come-nc

@come-nccome-nc commented Sep 12, 2024

Copy link
Copy Markdown
Contributor

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

@come-nccome-nc added 2. developing Work in progress technical debt 🧱 🤔🚀 labels Sep 12, 2024
@come-nccome-nc added this to the Nextcloud 31 milestone Sep 12, 2024
@come-nccome-nc self-assigned this Sep 12, 2024
Comment threadlib/public/App/IAppManager.php Outdated
Comment threadcore/Command/L10n/CreateJs.php Fixed
@come-nc
come-ncforce-pushed the fix/migrate-away-from-oc_app branch 2 times, most recently from 07141d5 to 2abf2d8CompareSeptember 13, 2024 07:24
…_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>
@come-nc
come-ncforce-pushed the fix/migrate-away-from-oc_app branch from 2abf2d8 to 7a16d01CompareSeptember 13, 2024 08:27
@come-nc
come-nc marked this pull request as ready for review September 13, 2024 09:08
@come-nc
come-nc requested review from provokateurin and susnux and removed request for ChristophWurst, miaulalala, nickvergessen and st3inySeptember 13, 2024 09:09
@come-nccome-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 13, 2024
@come-nc
come-nc requested review from a team, Altahrim and ArtificialOwl and removed request for a teamSeptember 13, 2024 09:09

@provokateurinprovokateurin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice cleanup!

Comment threadtests/lib/App/AppManagerTest.php
return \OCP\Server::get(IAppManager::class)->getAllAppsInAppsFolders();
}

/**

Copy link
Copy Markdown
Contributor

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 ?

Copy link
Copy Markdown
Member

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 🙈

Copy link
Copy Markdown
ContributorAuthor

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.

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
ContributorAuthor

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

@susnuxsusnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹

@come-nc
come-nc merged commit bcb4e78 into masterSep 13, 2024
@come-nc
come-nc deleted the fix/migrate-away-from-oc_app branch September 13, 2024 15:44
@skjnldsvskjnldsv mentioned this pull request Jan 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewstechnical debt🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@come-nc@nickvergessen@susnux@provokateurin@github-advanced-security