Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.3 KB

File metadata and controls

31 lines (22 loc) · 1.3 KB

Package Boundaries

CommonPHP Notifications owns the shared application notification boundary.

Belongs Here

  • Notification message objects.
  • Recipient value objects and recipient normalization.
  • Delivery status, result, and report objects.
  • Named channel registration and lookup.
  • Notification driver contracts and helpers.
  • A small notifier service.
  • Exceptions for invalid notification state and delivery failures.
  • Runtime service provider integration.

Does Not Belong Here

  • SMTP, SendGrid, Twilio, Slack, Teams, or webhook provider clients.
  • Template rendering engines.
  • Queues, workers, retry schedulers, or background jobs.
  • Marketing automation, campaign segmentation, or unsubscribe management.
  • Real-time chat or bidirectional messaging.
  • HTTP controllers, routing, UI rendering, or database persistence.

Those concerns should live in provider driver packages, application services, or other CommonPHP packages.

Integration Shape

Application code should create Notification objects and send them through NotifierInterface. Provider packages should implement NotificationDriverInterface and return structured DeliveryResult values.

This keeps application code independent from vendor APIs while still making provider-specific details available through result details and metadata.