Skip to content

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Dec 29, 2025

☑️ Resolves

The existing Events chapter was showing its age and in need of a refactor.

It was a bit confusing in some spots, wasn't up-to-date with current best practices, and lacked coverage of the dispatcher.

This PR modernizes and expands the documentation for Nextcloud Events:

  • adds emission/dispatch coverage
  • clarifies listener registration / instantiation / handler execution lifecycle
  • aligns docs/examples with current best practices - e.g.,
    • use the OCP Event Dispatcher and IBootstrap patterns
    • current PHP best practices
  • adds additional code examples:
    • e.g., defining events, registering listeners, and emitting/dispatching events, usage of event payloads, and DI
  • improves coverage of event payloads
  • de-emphasize legacy approaches, referencing them only for migration purposes
    • e.g., hooks, public emitters, pre-IBootstrap listener patterns
  • improves clarity throughout the documentation
    • e.g., correcting typos, clarifying ambiguous statements, and removing (most - ahem) informal phrasing
  • new table of contents

These changes ensure app authors have clear, up-to-date, and actionable guidance for both consuming and producing events in Nextcloud apps.

🖼️ Screenshots

_home_josh_workspace_nextcloud_documentation_developer_manual__build_html_com_basics_events html

…examples, clarify listener lifecycle

Expanded the events documentation w/ detailed explanations, examples, and deprecated hooks and emitters sections.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards changed the title docs(dev/events): modernize event system docs, add emission/dispatch examples, clarify listener lifecycle docs(dev/events): modernize / expand event system docs Dec 29, 2025
@joshtrichards joshtrichards added this to the Nextcloud 33 milestone Dec 29, 2025
@joshtrichards joshtrichards marked this pull request as ready for review December 29, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants