Merge branch 'master' into feat/40903/edit-user-dialog

This commit is contained in:
Peter R. 2026-04-30 15:25:52 +02:00 committed by GitHub
commit ec6ba2357d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 97 additions and 9 deletions

View file

@ -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 [];
}

View file

@ -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,

View file

@ -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', '');

View file

@ -15,6 +15,9 @@
findUnusedVariablesAndParams="true"
phpVersion="8.2"
>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<projectFiles>
<file name="core/BackgroundJobs/ExpirePreviewsJob.php"/>
<file name="lib/public/IContainer.php"/>
@ -34,7 +37,6 @@
<file name="lib/public/Share/IShareHelper.php"/>
<ignoreFiles>
<directory name="apps/**/composer"/>
<directory name="apps/**/tests"/>
<directory name="lib/composer"/>
<directory name="lib/l10n"/>
<directory name="3rdparty"/>
@ -43,6 +45,9 @@
<extraFiles>
<directory name="apps/dav/lib"/>
<directory name="apps/settings/lib"/>
<!-- As long as the files are not in the projectFiles list, we need to include them here to make psalm aware of our interfaces -->
<directory name="lib/private"/>
<directory name="lib/public"/>
<directory name="3rdparty"/>
</extraFiles>
<stubs>

View file

@ -20,6 +20,7 @@
<plugin filename="build/psalm/AppFrameworkTainter.php" />
<plugin filename="build/psalm/AttributeNamedParameters.php" />
<plugin filename="build/psalm/LogicalOperatorChecker.php" />
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<projectFiles>
<directory name="apps/admin_audit"/>

View file

@ -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
}
}
/**

View file

@ -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"
}
}

View file

@ -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",

View file

@ -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' => [