Skip to content

refactor(collaboration): rely on stable usort - #65969

Open
joshtrichards wants to merge 2 commits into
masterfrom
jtr/refactor-SortRelatedCleanup
Open

joshtrichards wants to merge 2 commits into
masterfrom
jtr/refactor-SortRelatedCleanup

Conversation

@joshtrichards

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

🧹 Remove the original-position tie-breaker wrappers from CommentersSorter and shareRecipientSorter which are no longer necessary today. Also add return typing in the latter.

Tests: already covered.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

PHP 8 guarantees stable sorting, so remove the original-position tie-breaker used to preserve order for ties.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Remove the original-position tie-breaker workaround. PHP 8+
preserves the input order of equal elements, so sorting can
operate directly on recipient arrays. Also add return typing.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 36 milestone Oct 27, 2026
@joshtrichards
joshtrichards requested a review from a team as a code owner October 27, 2026 13:39
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Oct 27, 2026
@joshtrichards
joshtrichards requested review from Altahrim, come-nc, salmart-dev and sorbaugh and removed request for a team October 27, 2026 13:39
@joshtrichards joshtrichards added feature: sharing feature: comments ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) ⏱️ review-effort: quick Can usually be reviewed from the diff and nearby context; targeted validation may be sufficient. labels Oct 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: comments feature: sharing ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) ⏱️ review-effort: quick Can usually be reviewed from the diff and nearby context; targeted validation may be sufficient.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant