From 767b6c25c7ae91ddfb63b56bb14c5ac5e065db68 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 27 Apr 2026 19:07:40 +0200 Subject: [PATCH 1/7] fix(core): provide valid initial state also on public templates The `core apps` initial state should be an array of apps currently available. But for public templates when there is no navigation entry the array would contain `[null]` instead of `[]` which breaks some use cases (e.g. apps that rely on some nextcloud-vue versions). Signed-off-by: Ferdinand Thiessen --- lib/private/TemplateLayout.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index ee10a26b01d..3acc8238c9d 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -163,7 +163,8 @@ class TemplateLayout { $page->assign('appid', $appId); $page->assign('bodyid', 'body-public'); - $this->initialState->provideInitialState('core', 'apps', [$this->navigationManager->get($appId)]); + $currentAppData = $this->navigationManager->get($appId); + $this->initialState->provideInitialState('core', 'apps', $currentAppData === null ? [] : [$currentAppData]); // Set logo link target $logoUrl = $this->config->getSystemValueString('logo_url', ''); From c2e2b5704dfa5ee2a1196e8bea9fe447e5be1297 Mon Sep 17 00:00:00 2001 From: Stephen Cuppett Date: Wed, 29 Apr 2026 11:59:09 -0400 Subject: [PATCH 2/7] fix(tests): Fix encryption test isolation between test runs Add global encryption teardown to TestCase base class so encryption state does not leak between test suites regardless of which tests ran earlier. Co-Authored-By: Claude Sonnet 4.6 (1M context) Signed-off-by: Stephen Cuppett --- tests/lib/TestCase.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index aed919a1e6f..b9e5dfc5500 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -27,6 +27,7 @@ use OC\User\Session; use OCP\Command\IBus; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\IRootFolder; +use OCP\IAppConfig; use OCP\IConfig; use OCP\IDBConnection; use OCP\IUserManager; @@ -195,6 +196,22 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { call_user_func([$this, $methodName]); } } + + // Clean up encryption state to prevent test pollution + // This ensures encryption_enabled is reset after each test, preventing + // MultiKeyEncryptException failures in subsequent tests when encryption + // is left enabled but user keys don't exist + try { + $appConfig = Server::get(IAppConfig::class); + $currentValue = $appConfig->getValueBool('core', 'encryption_enabled', false); + if ($currentValue) { + $appConfig->setValueBool('core', 'encryption_enabled', false); + $appConfig->deleteKey('core', 'default_encryption_module'); + $appConfig->deleteKey('encryption', 'useMasterKey'); + } + } catch (\Throwable $e) { + // Ignore - may be called before bootstrap completes + } } /** From 08ba7358c24592d614aeb458a3276508cc260c3c Mon Sep 17 00:00:00 2001 From: Worker Builder Date: Thu, 30 Apr 2026 06:18:34 +0000 Subject: [PATCH 3/7] build(hub): 34.0.0 beta 2 Signed-off-by: Worker Builder --- version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.php b/version.php index 54d45acc85f..b046ba22664 100644 --- a/version.php +++ b/version.php @@ -11,10 +11,10 @@ declare(strict_types=1); // between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level // when updating major/minor version number. -$OC_Version = [34, 0, 0, 2]; +$OC_Version = [34, 0, 0, 3]; // The human-readable string -$OC_VersionString = '34.0.0 beta 1'; +$OC_VersionString = '34.0.0 beta 2'; $OC_VersionCanBeUpgradedFrom = [ 'nextcloud' => [ From 42eebfb03cb260d0dba0465f6f75e8384018f80a Mon Sep 17 00:00:00 2001 From: provokateurin Date: Sun, 8 Mar 2026 08:47:05 +0100 Subject: [PATCH 4/7] feat(psalm): Enable PHPUnit plugin Signed-off-by: provokateurin --- psalm-strict.xml | 3 ++ psalm.xml | 1 + vendor-bin/psalm/composer.json | 7 ++-- vendor-bin/psalm/composer.lock | 60 +++++++++++++++++++++++++++++++++- 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/psalm-strict.xml b/psalm-strict.xml index 95d52600434..b4c67741217 100644 --- a/psalm-strict.xml +++ b/psalm-strict.xml @@ -15,6 +15,9 @@ findUnusedVariablesAndParams="true" phpVersion="8.2" > + + + diff --git a/psalm.xml b/psalm.xml index 655aaa2625c..d3ef1770aca 100644 --- a/psalm.xml +++ b/psalm.xml @@ -20,6 +20,7 @@ + diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index 78da32f7fb6..ea55244560f 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,7 +1,4 @@ { - "require": { - "vimeo/psalm": "^6.16" - }, "config": { "platform": { "php": "8.2.27" @@ -9,5 +6,9 @@ "allow-plugins": { "composer/package-versions-deprecated": true } + }, + "require": { + "psalm/plugin-phpunit": "^0.19.7", + "vimeo/psalm": "^6.16" } } diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index 0e9b269c8ea..9798c9cee16 100644 --- a/vendor-bin/psalm/composer.lock +++ b/vendor-bin/psalm/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7591b157e86a8c10c3360618317e822c", + "content-hash": "305efadf319961c090d8cd0b425471b1", "packages": [ { "name": "amphp/amp", @@ -1915,6 +1915,64 @@ }, "time": "2026-01-25T14:56:51+00:00" }, + { + "name": "psalm/plugin-phpunit", + "version": "0.19.7", + "source": { + "type": "git", + "url": "https://github.com/psalm/psalm-plugin-phpunit.git", + "reference": "143f9d5e049fffcdbc0da3fbb99f6149f9d3e2dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/143f9d5e049fffcdbc0da3fbb99f6149f9d3e2dc", + "reference": "143f9d5e049fffcdbc0da3fbb99f6149f9d3e2dc", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "php": ">=8.1", + "vimeo/psalm": "dev-master || ^6.10.0" + }, + "conflict": { + "phpspec/prophecy": "<1.20.0", + "phpspec/prophecy-phpunit": "<2.3.0", + "phpunit/phpunit": "<8.5.1" + }, + "require-dev": { + "php": "^7.3 || ^8.0", + "phpunit/phpunit": "^10.0 || ^11.0 || ^12.0", + "squizlabs/php_codesniffer": "^3.3.1", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" + } + }, + "autoload": { + "psr-4": { + "Psalm\\PhpUnitPlugin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Brown", + "email": "github@muglug.com" + } + ], + "description": "Psalm plugin for PHPUnit", + "support": { + "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/0.19.7" + }, + "time": "2025-03-31T18:49:55+00:00" + }, { "name": "psr/container", "version": "2.0.2", From a16c24b677c43fe8cb3a56017d7eea15050e66b0 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 19 Mar 2026 11:42:50 +0100 Subject: [PATCH 5/7] fix(psalm-strict): Also check app tests Signed-off-by: provokateurin --- psalm-strict.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/psalm-strict.xml b/psalm-strict.xml index b4c67741217..cca0d7823fe 100644 --- a/psalm-strict.xml +++ b/psalm-strict.xml @@ -37,7 +37,6 @@ - From d3031b8de5e8c5f44c5aac85c48c438971120f4c Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 30 Apr 2026 11:30:04 +0200 Subject: [PATCH 6/7] chore: make psalm and rector strict properly autoload OCP Signed-off-by: Ferdinand Thiessen --- build/rector-strict.php | 4 ++++ psalm-strict.xml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/build/rector-strict.php b/build/rector-strict.php index 3bc07860bd3..c8b655cdb6f 100644 --- a/build/rector-strict.php +++ b/build/rector-strict.php @@ -25,6 +25,10 @@ return (require __DIR__ . '/rector-shared.php') $nextcloudDir . '/lib/private/DB/QueryBuilder/TypedQueryBuilder.php', $nextcloudDir . '/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php', ]) + ->withAutoloadPaths([ + // ensure rector properly autoload the public interfaces + $nextcloudDir . '/lib/public', + ]) ->withPreparedSets( deadCode: true, codeQuality: true, diff --git a/psalm-strict.xml b/psalm-strict.xml index cca0d7823fe..d8f2488e2fa 100644 --- a/psalm-strict.xml +++ b/psalm-strict.xml @@ -45,6 +45,9 @@ + + + From 75273a67f0312f411d4ae2690e81d6bd66127db5 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 30 Apr 2026 11:31:18 +0200 Subject: [PATCH 7/7] chore: adjust for now fixed strict rector changes Signed-off-by: Ferdinand Thiessen --- apps/dav/lib/Connector/Sabre/Node.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index 799a273aaf6..b2ecf9b2f6a 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -28,6 +28,7 @@ use OCP\Lock\LockedException; use OCP\PreConditionNotMetException; use OCP\Server; use OCP\Share\Exceptions\ShareNotFound; +use OCP\Share\IAttributes; use OCP\Share\IManager; use RuntimeException; use Sabre\DAV\Exception; @@ -297,7 +298,7 @@ abstract class Node implements INode { $attributes = []; if ($storage->instanceOfStorage(ISharedStorage::class)) { $attributes = $storage->getShare()->getAttributes(); - if ($attributes === null) { + if (!$attributes instanceof IAttributes) { return []; }