Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions build/rector-strict.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -60,6 +61,12 @@
php83: true,
)->withSkip([
AddSeeTestAnnotationRector::class,
// `@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 => [
$nextcloudDir . '/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php',
],
Comment on lines +64 to +69

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe skip this rector on all files then?
If it removes @return $this when return type is self, it’s broken.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DerDreschner DerDreschner Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is fine, but breaks the rules for psalm-strict. It's contrary.

ReadOnlyPropertyRector::class => [
$nextcloudDir . '/core/Listener/RestrictInteractionListener.php',
$nextcloudDir . '/apps/files_sharing/lib/Listener/RestrictInteractionListener.php',
Expand Down
Loading