From 0e1f4f91d6ffbfc098fa469c7a97e787d31f8a3a Mon Sep 17 00:00:00 2001 From: David Dreschner Date: Mon, 13 Jul 2026 05:35:48 +0200 Subject: [PATCH] chore(tests): Fix broken rector run due to conflict with psalm Assisted-by: ClaudeCode:claude-fable-5 Signed-off-by: David Dreschner --- build/rector-strict.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/rector-strict.php b/build/rector-strict.php index 0a7bde5447027..a2534b6cf5356 100644 --- a/build/rector-strict.php +++ b/build/rector-strict.php @@ -5,6 +5,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +use Rector\DeadCode\Rector\ClassMethod\RemoveDuplicatedReturnSelfDocblockRector; use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; use Rector\Php82\Rector\Class_\ReadOnlyClassRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector; @@ -68,4 +69,8 @@ $nextcloudDir . '/core/Listener/RestrictInteractionListener.php', $nextcloudDir . '/apps/files_sharing/lib/Listener/RestrictInteractionListener.php', ], + // `@return $this` is more specific than the native `: self` on a + // non-final type; removing it breaks psalm's + // LessSpecificImplementedReturnType check (psalm-strict). + RemoveDuplicatedReturnSelfDocblockRector::class, ]);