Skip to content

refactor: use public server API instead of private classes - #9585

Merged
mejo- merged 1 commit into
mainfrom
refactor/public_server_api
Nov 10, 2026
Merged

mejo- merged 1 commit into
mainfrom
refactor/public_server_api

Conversation

@mejo-

@mejo- mejo- commented Nov 10, 2026

Copy link
Copy Markdown
Member

Replace OC\User\NoUserException with
OCP\User\Exceptions\UserNotFoundException. The private exception extends the public one since server 35, and IRootFolder::getUserFolder() documents the public one, so the catch blocks behave the same.

Replace OC\Files\Node\File with OCP\Files\File in WorkspacePlugin. The private class was only needed for getFileInfo(); the public node exposes getId() and getEtag() directly.

Drop the now unused NoUserException psalm stub.

Assisted-by: ClaudeCode:claude-opus-5-5

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@mejo- mejo- self-assigned this Nov 10, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Nov 10, 2026
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Nov 10, 2026
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Nov 10, 2026
@mejo-
mejo- force-pushed the refactor/public_server_api branch from 9ded75c to f04932c Compare November 10, 2026 16:33
Replace OC\User\NoUserException with
OCP\User\Exceptions\UserNotFoundException. The private exception extends
the public one since server 35, and IRootFolder::getUserFolder()
documents the public one, so the catch blocks behave the same.

Replace OC\Files\Node\File with OCP\Files\File in WorkspacePlugin. The
private class was only needed for getFileInfo(); the public node exposes
getId() and getEtag() directly.

Drop the now unused NoUserException psalm stub.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the refactor/public_server_api branch from f04932c to 66a63e1 Compare November 10, 2026 17:07
@mejo-
mejo- enabled auto-merge November 10, 2026 17:12
@mejo-
mejo- merged commit ef312c4 into main Nov 10, 2026
70 checks passed
@mejo-
mejo- deleted the refactor/public_server_api branch November 10, 2026 17:28
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits technical debt

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

3 participants