-
-
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
feat(updater): hide overwrites from disabled apps list on upgrade #29988
Conversation
6867b9e
to
9a86907
Compare
9a86907
to
9dc53c3
Compare
9dc53c3
to
4d909a3
Compare
Hiding app overwrite on minor updates is fine, imo. |
This actually makes sense. Hmm, this would need to be done as an additional migration step, I guess? The array would then not be updated yet when this code runs, so we'd need to additionally check for a major upgrade and then change this code like: if ($isMajorUpgrade || !in_array($appInfo['name'], $incompatibleOverwrites)) { with |
4d909a3
to
4744ce8
Compare
4744ce8
to
a5e8fb3
Compare
This is very important, can you raise that today at the server call @szaimen ? :) |
I can try :) |
a5e8fb3
to
d9c5524
Compare
d9c5524
to
cf76077
Compare
ec05b2a
to
4ecc956
Compare
@@ -188,8 +189,10 @@ | |||
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($output) { | |||
$output->writeln('<info>Updated database</info>'); | |||
}); | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output) { | |||
$output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>'); | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output, &$incompatibleOverwrites) { |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
@@ -188,8 +189,10 @@ | |||
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($output) { | |||
$output->writeln('<info>Updated database</info>'); | |||
}); | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output) { | |||
$output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>'); | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output, &$incompatibleOverwrites) { |
Check notice
Code scanning / Psalm
MissingClosureParamType Note
@@ -162,8 +163,10 @@ | |||
$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) { | |||
$eventSource->send('success', $l->t('Updated "%1$s" to %2$s', [$app, $version])); | |||
}); | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) { | |||
$incompatibleApps[] = $app; | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps, &$incompatibleOverwrites) { |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
@@ -162,8 +163,10 @@ | |||
$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) { | |||
$eventSource->send('success', $l->t('Updated "%1$s" to %2$s', [$app, $version])); | |||
}); | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) { | |||
$incompatibleApps[] = $app; | |||
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps, &$incompatibleOverwrites) { |
Check notice
Code scanning / Psalm
MissingClosureParamType Note
4ecc956
to
d98e29a
Compare
d98e29a
to
2d5a6cf
Compare
2d5a6cf
to
ab6c32e
Compare
Any idea what "Conventional Commits" does not like about the commits text? I added type and scope, so that should be fine: https://www.conventionalcommits.org/en/v1.0.0/ Probably something for the |
|
Ah, it says "types other than This PR is not really a (new) feature, I'd say, but there is no better matching type indeed 🙂. |
If an incompatible app is enabled manually, it is added to the "app_install_overwrite" array in config.php. Nextcloud upgrades won't disable any app in this array, but they were still shown on the upgrade page and logs as being disabled. This commit assures that only apps which are really disabled, i.e. which are not in the "app_install_overwrite" array, are shown and logged as disabled during upgrades. Signed-off-by: MichaIng <[email protected]>
ab6c32e
to
7b137dd
Compare
If an incompatible app is enabled manually, it is added to the
app_install_overwrite
array inconfig.php
. Nextcloud upgrades won't disable any app in this array, but they were still shown on the upgrade page as being disabled.This commit assures that only apps are shown as "These incompatible apps will be disabled:" which are really disabled, i.e. which are not in the
app_install_overwrite
array.