Skip to content

Create @h3ravel/events package for event dispatching and listeners or improve existing one #85

@3m1n3nc3

Description

@3m1n3nc3

Description

Introduce a standalone @h3ravel/events package to handle event dispatching, listeners, and subscribers across the framework.

This package should be usable independently of HTTP and other H3ravel modules.


Goals

  • Centralize event handling
  • Enable async and queued events
  • Allow decoupled communication between modules

Key Features

  • Event dispatcher
  • Event listener registration
  • Subscriber support
  • Synchronous and asynchronous dispatch
  • Optional queue integration (when available)

Tasks

  • Create @h3ravel/events package
  • Define event and listener contracts
  • Implement event dispatcher
  • Support class-based and function-based listeners
  • Add basic tests for dispatching and listening
  • Add usage documentation

Acceptance Criteria

  • Events can be dispatched and listened to
  • Multiple listeners per event supported
  • No dependency on HTTP
  • Typed event payloads supported

Difficulty

Intermediate

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions