Skip to content

refactor(URLGenerator): split long imagePath() policy into easy to read to helpers + one shared primitive#60919

Draft
joshtrichards wants to merge 5 commits into
masterfrom
jtr/refactor-imagePath
Draft

refactor(URLGenerator): split long imagePath() policy into easy to read to helpers + one shared primitive#60919
joshtrichards wants to merge 5 commits into
masterfrom
jtr/refactor-imagePath

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Jun 2, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

This policy is long and monolithic; also includes duplicate logic. This splits the policy up into three policy-level self-documenting helpers along with a single shared primitive.

Small bug fix included: normalize '' to 'core' before computing cache storage key.

Notes

If this approach is deemed attractive, maybe we use it in some of the other long policy path resolving spots.

Related: #60481

TODO

  • Resolve simple conflict

Checklist

AI (if applicable)

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

Also fixes a couple presumed bugs

Signed-off-by: Josh <josh.t.richards@gmail.com>
…readability/

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Jun 2, 2026
@joshtrichards joshtrichards added 2. developing Work in progress technical debt 🧱 🤔🚀 php Pull requests that update Php code ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jun 2, 2026
…avior

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@susnux susnux added the community pull requests from community label Jun 9, 2026
@joshtrichards

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

…URLGenerator.php

Signed-off-by: Josh <josh.t.richards@gmail.com>

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Done. Merged master into the branch and resolved the conflict in lib/private/URLGenerator.php — the only conflict was a trivial blank-line coding standard change from master that overlapped with our new helper methods. All helper methods are preserved and the coding standard fix is incorporated.

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

Labels

2. developing Work in progress community pull requests from community php Pull requests that update Php code ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) technical debt 🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants