-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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 and toward IAppManager. #44025
Conversation
173f7f9
to
f281499
Compare
/** | ||
* @return string[] $appId => $enabled | ||
*/ | ||
private function getInstalledAppsValues(): array { | ||
if (!$this->installedAppsCache) { | ||
$values = $this->appConfig->getValues(false, 'enabled'); | ||
$values = $this->getAppConfig()->getValues(false, 'enabled'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
01b858c
to
babdd5a
Compare
@@ -237,7 +249,7 @@ | |||
private function getAppTypes(string $app): array { | |||
//load the cache | |||
if (count($this->appTypes) === 0) { | |||
$this->appTypes = $this->appConfig->getValues(false, 'types') ?: []; | |||
$this->appTypes = $this->getAppConfig()->getValues(false, 'types') ?: []; |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
81bc004
to
3083a2e
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.
To avoid some kaboom we might want to merge this after the 29 branch-off
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…lled Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Also fixed AppTest 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>
3083a2e
to
1b5a0c3
Compare
Rebased and fixed conflicts |
@@ -541,7 +553,7 @@ | |||
} | |||
|
|||
$this->installedAppsCache[$appId] = 'yes'; | |||
$this->appConfig->setValue($appId, 'enabled', 'yes'); | |||
$this->getAppConfig()->setValue($appId, 'enabled', 'yes'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
@@ -595,7 +607,7 @@ | |||
}, $groups); | |||
|
|||
$this->installedAppsCache[$appId] = json_encode($groupIds); | |||
$this->appConfig->setValue($appId, 'enabled', json_encode($groupIds)); | |||
$this->getAppConfig()->setValue($appId, 'enabled', json_encode($groupIds)); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
@@ -616,15 +628,15 @@ | |||
} | |||
|
|||
if ($automaticDisabled) { | |||
$previousSetting = $this->appConfig->getValue($appId, 'enabled', 'yes'); | |||
$previousSetting = $this->getAppConfig()->getValue($appId, 'enabled', 'yes'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
if ($previousSetting !== 'yes' && $previousSetting !== 'no') { | ||
$previousSetting = json_decode($previousSetting, true); | ||
} | ||
$this->autoDisabledApps[$appId] = $previousSetting; | ||
} | ||
|
||
unset($this->installedAppsCache[$appId]); | ||
$this->appConfig->setValue($appId, 'enabled', 'no'); | ||
$this->getAppConfig()->setValue($appId, 'enabled', 'no'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
@@ -689,7 +701,7 @@ | |||
$apps = $this->getInstalledApps(); | |||
foreach ($apps as $appId) { | |||
$appInfo = $this->getAppInfo($appId); | |||
$appDbVersion = $this->appConfig->getValue($appId, 'installed_version'); | |||
$appDbVersion = $this->getAppConfig()->getValue($appId, 'installed_version'); |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
…ones Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@nickvergessen Reverted both calls. We’ll need later to add a replacement for getAllApps. But the |
Circular dependencies in 99% of the cases |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Yes, it was urlgenerator injection causing trouble as suspected. At first I thought it was not because I had missed one place it was pulled from. |
Related to open issue: #8505 :) |
Summary
Migrate away from OC_App and toward IAppManager.
Checklist