Skip to content

fix: Fix typing of $mask - #1493

Merged
provokateurin merged 1 commit into
mainfrom
carl/fix-guest
Feb 20, 2026
Merged

provokateurin merged 1 commit into
mainfrom
carl/fix-guest

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member

Make sure it is available in DirMask as it is private in the parent class.

Make sure it is available in DirMask as it is private in the parent
class.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
Comment thread lib/Storage/DirMask.php
Comment on lines +40 to +41
* @param array{storage: \OCP\Files\Storage\IStorage, mask: int, path: string, ...} $parameters
* @psalm-suppress MoreSpecificImplementedParamType

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* @param array{storage: \OCP\Files\Storage\IStorage, mask: int, path: string, ...} $parameters
* @psalm-suppress MoreSpecificImplementedParamType
* @param array{storage: \OC\Files\Storage\Storage, mask: int, path: string} $parameters

I think this is correct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sadly not, psalm will complain that the argument expected are more restrictive than that is written in the base storage wrapper which is just an array.

I don't see a good way around that

@provokateurin
provokateurin merged commit 05e93af into main Feb 20, 2026
54 checks passed
@provokateurin
provokateurin deleted the carl/fix-guest branch February 20, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants