Skip to content

chore: drop unused legacy hooks that already have a typed event - #66234

Merged
susnux merged 6 commits into
masterfrom
chore/remove-unused-legacy-hooks
Nov 4, 2026
Merged

susnux merged 6 commits into
masterfrom
chore/remove-unused-legacy-hooks

Conversation

@susnux

@susnux susnux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Summary

For this hooks I looked up all of our apps and non is using them anymore.
Moreover only hooks are removed that already have a typed event available.

Checklist

AI (if applicable)

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

Nothing listens to `OC_Filesystem::update` or `post_update` anymore.
`write`/`post_write` are emitted at the same places and typed listeners
use `BeforeNodeWrittenEvent`/`NodeWrittenEvent`.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Nothing listens to `OC_Filesystem::create_mount` or `delete_mount`
anymore, `StorageCreatedEvent`, `StorageUpdatedEvent` and
`StorageDeletedEvent` are dispatched instead. The mount cache
invalidation that was dispatched together with the hooks is kept.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Nothing listens to the `OCP\Share` hooks `pre_shared`, `post_shared`,
`pre_unshare`, `post_unshare` and `post_unshareFromSelf` anymore. They
were only re-emitted from the typed `BeforeShareCreatedEvent`,
`ShareCreatedEvent`, `BeforeShareDeletedEvent`, `ShareDeletedEvent` and
`ShareDeletedFromSelfEvent`, which remain.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Nothing listens to the `Scanner::addToCache` and `removeFromCache`
legacy hooks or to the `postScanFile` and `postScanFolder` signals of
`OC\Files\Utils\Scanner` anymore. The cache dispatches
`CacheEntryInsertedEvent`, `CacheEntryUpdatedEvent` and
`CacheEntryRemovedEvent`, and the scanner dispatches `FileScannedEvent`
and `FolderScannedEvent`.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Only `postWrite` of the `\OC\Files` root folder emitter is still
listened to. All other signals have typed `Node*` event replacements
and no listeners left, so they are no longer emitted.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Nothing listens to the `\OC\Group` signals `postAddUser`,
`postRemoveUser`, `postDelete`, `preCreate` and `postCreate` or to the
`\OC\User` signal `postRememberedLogin` anymore. `UserAddedEvent`,
`UserRemovedEvent`, `GroupDeletedEvent`, `BeforeGroupCreatedEvent`,
`GroupCreatedEvent` and `UserLoggedInWithCookieEvent` are dispatched
at the same places.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux added this to the Nextcloud 36 milestone Nov 3, 2026
@susnux susnux added 3. to review Waiting for reviews technical debt 🧱 🤔🚀 ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Nov 3, 2026
@susnux susnux added the pending documentation This pull request needs an associated documentation update label Nov 4, 2026
@susnux
susnux marked this pull request as ready for review November 4, 2026 11:08
@susnux
susnux requested review from a team as code owners November 4, 2026 11:08

@provokateurin provokateurin left a comment

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.

🐘

@susnux
susnux merged commit f1d873b into master Nov 4, 2026
191 of 216 checks passed
@susnux
susnux deleted the chore/remove-unused-legacy-hooks branch November 4, 2026 13:40
@susnux

susnux commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

documentation: nextcloud/documentation#16008

@susnux susnux removed the pending documentation This pull request needs an associated documentation update label Nov 4, 2026
tflidd pushed a commit to MrRinkana/documentation that referenced this pull request Nov 7, 2026
Document the share, group, filesystem, root folder and scanner hooks
removed in nextcloud/server#66234 together with their replacement events
in the Nextcloud 36 developer release notes.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
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 AI assisted ♻️ 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.

5 participants