symfony/notifier
Symfony Notifier sends notifications through multiple channels like email, SMS, chat apps, and push. It unifies transports and routing so you can dispatch messages to users via one or more providers with a consistent API.
NotificationSent, NotificationFailed) integrates seamlessly with Laravel’s event system or Symfony Messenger, enabling reactive workflows (e.g., retries, analytics).symfony/http-client, symfony/mailer) ensures zero friction in adopting Notifier.Notification interface mirrors Laravel’s Mailable, enabling gradual migration of existing email logic.symfony/http-client) or using test doubles for channels.SentMessage class or integrate with Laravel Telescope.NotificationClient) with channel-specific transports.config/notifier.php) for environment-specific channel settings.send(Notification::class)->delay(now()->addMinute())).Http facade with symfony/http-client for consistent transport handling.symfony/mailer for email channels if not using Laravel’s Mailable.failed_jobs table to store notification-specific metadata (e.g., channel, recipient).notifications table for tracking delivery status (e.g., sent_at, read_at).| Phase | Action | Tools/Dependencies | Risk |
|---|---|---|---|
| Assessment | Audit existing notification logic (emails, SMS, webhooks). | phpstan, phpmd |
Low |
| Setup | Install Notifier and configure core channels (e.g., SMS, Email). | composer require symfony/notifier, config publish |
Medium (channel-specific quirks) |
| Adapter Layer | Create Laravel-specific adapters (e.g., LaravelNotification). |
Service Provider, Facades | Low |
| Template Refactor | Migrate custom email/SMS templates to Notifier’s Notification class. |
Blade/Twig, Livewire (for dynamic content) | Medium (template complexity) |
| Queue Integration | Wrap Notifier in Laravel queues for async delivery. | Illuminate\Queue, Illuminate\Bus |
Low |
| Channel Expansion | Add non-core channels (e.g., Slack, Discord) incrementally. | Channel-specific configs, webhook handlers | High (API limits, payloads) |
| Monitoring | Implement delivery tracking (e.g., Telescope, custom dashboard). | Laravel Telescope, Prometheus | Medium (analytics setup) |
| Deprecation | Phase out legacy notification code post-migration. | Feature flags, deprecation warnings | Low |
Mailable or symfony/mailer.How can I help you explore Laravel packages today?