Open
Conversation
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com> Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> # Conflicts: # tests/unit/Service/ApiServiceTest.php
rikled
requested changes
Mar 16, 2026
| // Disable file locking for Readme.md files, because in the | ||
| // current setup, this makes it almost impossible to delete these files. | ||
| /** @psalm-suppress RedundantCastGivenDocblockType */ | ||
| if (!$readOnly && strcasecmp((string)$file->getName(), 'Readme.md') !== 0) { |
Contributor
There was a problem hiding this comment.
I think we don't need the string cast anymore since I added a name in the ApiServiceTest.php
Contributor
There was a problem hiding this comment.
Then you should also be able to remove /** @psalm-suppress RedundantCastGivenDocblockType */
Contributor
Author
There was a problem hiding this comment.
thank you @rikled! Then it will look like:
if (!$readOnly) {
Contributor
There was a problem hiding this comment.
No, I think it should look like this:
// Disable file locking for Readme.md files, because in the
// current setup, this makes it almost impossible to delete these files.
if (!$readOnly && strcasecmp($file->getName(), 'Readme.md') !== 0) {
so just remove the string cast and the psalm suppress command. Then hopefully the php unit tests will still pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Backport for #8284
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)