Skip to content

Commit 01e79e7

Browse files
authored
Merge pull request #57583 from nextcloud/chore/drop-whats-new
chore: drop legacy `WhatsNew`
2 parents a9f3534 + 0e75043 commit 01e79e7

File tree

20 files changed

+28
-1710
lines changed

20 files changed

+28
-1710
lines changed

apps/updatenotification/lib/UpdateChecker.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
*/
1010
namespace OCA\UpdateNotification;
1111

12-
use OC\Updater\ChangesCheck;
1312
use OC\Updater\VersionCheck;
1413
use OCP\AppFramework\Services\IInitialState;
1514

1615
class UpdateChecker {
1716

1817
public function __construct(
1918
private VersionCheck $updater,
20-
private ChangesCheck $changesCheck,
2119
private IInitialState $initialState,
2220
) {
2321
}
@@ -41,13 +39,6 @@ public function getUpdateState(): array {
4139
if (strpos($data['url'], 'https://') === 0) {
4240
$result['downloadLink'] = $data['url'];
4341
}
44-
if (strpos($data['changes'], 'https://') === 0) {
45-
try {
46-
$result['changes'] = $this->changesCheck->check($data['changes'], $data['version']);
47-
} catch (\Exception $e) {
48-
// no info, not a problem
49-
}
50-
}
5142

5243
return $result;
5344
}

apps/updatenotification/tests/UpdateCheckerTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99
namespace OCA\UpdateNotification\Tests;
1010

11-
use OC\Updater\ChangesCheck;
1211
use OC\Updater\VersionCheck;
1312
use OCA\UpdateNotification\UpdateChecker;
1413
use OCP\AppFramework\Services\IInitialState;
@@ -17,7 +16,6 @@
1716

1817
class UpdateCheckerTest extends TestCase {
1918

20-
private ChangesCheck&MockObject $changesChecker;
2119
private VersionCheck&MockObject $updater;
2220
private IInitialState&MockObject $initialState;
2321
private UpdateChecker $updateChecker;
@@ -26,11 +24,9 @@ protected function setUp(): void {
2624
parent::setUp();
2725

2826
$this->updater = $this->createMock(VersionCheck::class);
29-
$this->changesChecker = $this->createMock(ChangesCheck::class);
3027
$this->initialState = $this->createMock(IInitialState::class);
3128
$this->updateChecker = new UpdateChecker(
3229
$this->updater,
33-
$this->changesChecker,
3430
$this->initialState,
3531
);
3632
}
@@ -85,15 +81,10 @@ public function testGetUpdateStateWithUpdateAndValidLink(): void {
8581
'versionstring' => 'Nextcloud 1.2.3',
8682
'web' => 'https://docs.nextcloud.com/myUrl',
8783
'url' => 'https://downloads.nextcloud.org/server',
88-
'changes' => 'https://updates.nextcloud.com/changelog_server/?version=123.0.0',
8984
'autoupdater' => '1',
9085
'eol' => '0',
9186
]);
9287

93-
$this->changesChecker->expects($this->once())
94-
->method('check')
95-
->willReturn($changes);
96-
9788
$expected = [
9889
'updateAvailable' => true,
9990
'updateVersion' => '1.2.3',
@@ -102,7 +93,6 @@ public function testGetUpdateStateWithUpdateAndValidLink(): void {
10293
'versionIsEol' => false,
10394
'updateLink' => 'https://docs.nextcloud.com/myUrl',
10495
'downloadLink' => 'https://downloads.nextcloud.org/server',
105-
'changes' => $changes,
10696
];
10797
$this->assertSame($expected, $this->updateChecker->getUpdateState());
10898
}
@@ -126,7 +116,6 @@ public function testSetInitialState(): void {
126116
'versionstring' => 'Nextcloud 1.2.3',
127117
'web' => 'https://docs.nextcloud.com/myUrl',
128118
'url' => 'https://downloads.nextcloud.org/server',
129-
'changes' => 'https://updates.nextcloud.com/changelog_server/?version=123.0.0',
130119
'autoupdater' => '1',
131120
'eol' => '0',
132121
]);

build/psalm-baseline.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,12 +3215,6 @@
32153215
)]]></code>
32163216
</DeprecatedMethod>
32173217
</file>
3218-
<file src="core/Controller/WhatsNewController.php">
3219-
<DeprecatedMethod>
3220-
<code><![CDATA[getUserValue]]></code>
3221-
<code><![CDATA[setUserValue]]></code>
3222-
</DeprecatedMethod>
3223-
</file>
32243218
<file src="core/Middleware/TwoFactorMiddleware.php">
32253219
<DeprecatedInterface>
32263220
<code><![CDATA[private]]></code>

core/Controller/WhatsNewController.php

Lines changed: 0 additions & 104 deletions
This file was deleted.

core/Listener/AddMissingIndicesListener.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,6 @@ public function handle(Event $event): void {
9999
true
100100
);
101101

102-
$event->addMissingIndex(
103-
'whats_new',
104-
'version',
105-
['version'],
106-
[],
107-
true
108-
);
109-
110102
$event->addMissingIndex(
111103
'cards',
112104
'cards_abiduri',

core/Migrations/Version14000Date20180626223656.php

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
/**
4+
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
5+
* SPDX-License-Identifier: AGPL-3.0-or-later
6+
*/
7+
8+
namespace OC\Core\Migrations;
9+
10+
use OCP\DB\ISchemaWrapper;
11+
use OCP\Migration\IOutput;
12+
use OCP\Migration\SimpleMigrationStep;
13+
14+
class Version34000Date20260122120000 extends SimpleMigrationStep {
15+
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
16+
/** @var ISchemaWrapper $schema */
17+
$schema = $schemaClosure();
18+
if ($schema->hasTable('whats_new')) {
19+
$schema->dropTable('whats_new');
20+
}
21+
return $schema;
22+
}
23+
}

0 commit comments

Comments
 (0)