Skip to content

docs(dev/events): modernize / expand event system docs#13957

Open
joshtrichards wants to merge 13 commits intomasterfrom
jtr/docs-dev-events-modernize
Open

docs(dev/events): modernize / expand event system docs#13957
joshtrichards wants to merge 13 commits intomasterfrom
jtr/docs-dev-events-modernize

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

image

…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
@susnux susnux requested a review from come-nc January 5, 2026 21:13
@blizzz blizzz modified the milestones: Nextcloud 33, Nextcloud 34 Feb 16, 2026
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>
…nstantiation

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>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Also added new subsections for stopping, blocking, and broadcasting. And updated deprecated section: added GenericEvent and re-organized.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
Copy link
Member Author

Revised further:

  • clarified various confusing bits
  • fixed some inaccurate spots
  • fixed some broken examples
  • integrated earlier review feedback
  • added some additional events and scenarios

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
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