diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-05-06 19:44:50 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-05-13 10:04:35 +0200 |
commit | 76696be7628ed2f0bdd4fb399cfa9254cd38da75 (patch) | |
tree | 31a6b0549dd660e57abcfaa95c83ce5daf76439c | |
parent | 9255afaeab82beaf46f5ed7a6b7dc5caef7c3f45 (diff) | |
download | nextcloud-server-chore/refactor-update-notification+.tar.gz nextcloud-server-chore/refactor-update-notification+.zip |
chore: remove legacy migration step to remove background jobchore/refactor-update-notification+
This is already included since Nextcloud 29, so the background job is
removed and the class does not exist anymore.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
4 files changed, 1 insertions, 64 deletions
diff --git a/apps/updatenotification/composer/autoload.php b/apps/updatenotification/composer/autoload.php index 36afdad067f..a1e9eceb11c 100644 --- a/apps/updatenotification/composer/autoload.php +++ b/apps/updatenotification/composer/autoload.php @@ -14,10 +14,7 @@ if (PHP_VERSION_ID < 50600) { echo $err; } } - trigger_error( - $err, - E_USER_ERROR - ); + throw new RuntimeException($err); } require_once __DIR__ . '/composer/autoload_real.php'; diff --git a/apps/updatenotification/composer/composer/autoload_classmap.php b/apps/updatenotification/composer/composer/autoload_classmap.php index 4aa401f661e..a03003ef3b2 100644 --- a/apps/updatenotification/composer/composer/autoload_classmap.php +++ b/apps/updatenotification/composer/composer/autoload_classmap.php @@ -18,7 +18,6 @@ return array( 'OCA\\UpdateNotification\\Listener\\AppUpdateEventListener' => $baseDir . '/../lib/Listener/AppUpdateEventListener.php', 'OCA\\UpdateNotification\\Listener\\BeforeTemplateRenderedEventListener' => $baseDir . '/../lib/Listener/BeforeTemplateRenderedEventListener.php', 'OCA\\UpdateNotification\\Manager' => $baseDir . '/../lib/Manager.php', - 'OCA\\UpdateNotification\\Migration\\Version011901Date20240305120000' => $baseDir . '/../lib/Migration/Version011901Date20240305120000.php', 'OCA\\UpdateNotification\\Notification\\AppUpdateNotifier' => $baseDir . '/../lib/Notification/AppUpdateNotifier.php', 'OCA\\UpdateNotification\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', 'OCA\\UpdateNotification\\ResponseDefinitions' => $baseDir . '/../lib/ResponseDefinitions.php', diff --git a/apps/updatenotification/composer/composer/autoload_static.php b/apps/updatenotification/composer/composer/autoload_static.php index 9e1fdd09def..57eedf5e075 100644 --- a/apps/updatenotification/composer/composer/autoload_static.php +++ b/apps/updatenotification/composer/composer/autoload_static.php @@ -33,7 +33,6 @@ class ComposerStaticInitUpdateNotification 'OCA\\UpdateNotification\\Listener\\AppUpdateEventListener' => __DIR__ . '/..' . '/../lib/Listener/AppUpdateEventListener.php', 'OCA\\UpdateNotification\\Listener\\BeforeTemplateRenderedEventListener' => __DIR__ . '/..' . '/../lib/Listener/BeforeTemplateRenderedEventListener.php', 'OCA\\UpdateNotification\\Manager' => __DIR__ . '/..' . '/../lib/Manager.php', - 'OCA\\UpdateNotification\\Migration\\Version011901Date20240305120000' => __DIR__ . '/..' . '/../lib/Migration/Version011901Date20240305120000.php', 'OCA\\UpdateNotification\\Notification\\AppUpdateNotifier' => __DIR__ . '/..' . '/../lib/Notification/AppUpdateNotifier.php', 'OCA\\UpdateNotification\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', 'OCA\\UpdateNotification\\ResponseDefinitions' => __DIR__ . '/..' . '/../lib/ResponseDefinitions.php', diff --git a/apps/updatenotification/lib/Migration/Version011901Date20240305120000.php b/apps/updatenotification/lib/Migration/Version011901Date20240305120000.php deleted file mode 100644 index 6c608df313d..00000000000 --- a/apps/updatenotification/lib/Migration/Version011901Date20240305120000.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -declare(strict_types=1); - -/** - * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace OCA\UpdateNotification\Migration; - -use OCA\UpdateNotification\BackgroundJob\ResetToken; -use OCA\UpdateNotification\Notification\BackgroundJob; -use OCA\UpdateNotification\ResetTokenBackgroundJob; -use OCP\BackgroundJob\IJobList; -use OCP\Migration\IOutput; -use OCP\Migration\SimpleMigrationStep; - -/** - * Drop this with Nextcloud 30 - */ -class Version011901Date20240305120000 extends SimpleMigrationStep { - - public function __construct( - private IJobList $joblist, - ) { - } - - public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options): void { - /** - * Remove and replace the reset-updater-token background job - * This class was renamed so it is now unknow but we still need to remove it - * @psalm-suppress UndefinedClass, InvalidArgument - */ - $hasOldResetToken = $this->joblist->has(ResetTokenBackgroundJob::class, null); - $hasNewResetToken = $this->joblist->has(ResetToken::class, null); - if ($hasOldResetToken) { - /** - * @psalm-suppress UndefinedClass, InvalidArgument - */ - $this->joblist->remove(ResetTokenBackgroundJob::class); - if (!$hasNewResetToken) { - $this->joblist->add(ResetToken::class); - } - } - - /** - * Remove the "has updates" background job, the new one is automatically started from the info.xml - * @psalm-suppress UndefinedClass, InvalidArgument - */ - if ($this->joblist->has(BackgroundJob::class, null)) { - /** - * @psalm-suppress UndefinedClass, InvalidArgument - */ - $this->joblist->remove(BackgroundJob::class); - } - } -} |