Symfony Notifier Integration: The package bridges Conexteo (a messaging/SMS provider) with Symfony’s Notifier component, enabling seamless SMS/notification delivery via Symfony’s standardized Message and Transport interfaces.
Notification classes, Transport abstraction) for consistency with existing email/SMS providers (e.g., Twilio, Mailgun).symfony/notifier or laravel-notification-channels wrappers).Laravel Compatibility:
Notification system (via illuminate/notifications) is not directly compatible, but can be adapted via:
symfony/notifier in Laravel (e.g., via spatie/laravel-symfony-notifier).ViaConexteoChannel wrapping this package’s ConexteoTransport.Notification system is already in use.Bus queue system or Horizon (if async is needed).Notification classes to Symfony’s Message interface).| Component | Laravel Fit | Workaround Needed |
|---|---|---|
| Symfony Notifier | ❌ (Not native) | Use spatie/laravel-symfony-notifier or manual symfony/notifier install. |
| DSN Config | ✅ (Laravel .env compatible) |
No change needed. |
| Notification | ⚠️ (Partial) | Extend Laravel’s Notification to use Symfony’s Message. |
| Queues | ❌ (No native Symfony queue support) | Use Laravel’s queue system + custom Transport wrapper. |
| Webhooks | ❌ (No built-in) | Implement a Laravel route/controller to handle Conexteo callbacks. |
Option A: Symfony Notifier in Laravel (Recommended for New Projects)
composer require symfony/notifier spatie/laravel-symfony-notifier
composer require com-company/connexteo-notifier
.env:
CONEXTEO_DSN=conexteo://APP_ID:API_KEY@default?sender=SENDER
Message and send via Laravel:
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\NotifierInterface;
$notifier = app(NotifierInterface::class);
$message = new SmsMessage('Hello', '+1234567890');
$notifier->send($message);
Option B: Custom Laravel Notification Channel (For Existing Projects)
ViaConexteoChannel extending Illuminate\Notifications\Channels\Channel:
use ComCompany\ConexteoNotifier\Transport\ConexteoTransport;
class ViaConexteoChannel extends Channel {
public function send($notifiable, ConexteoSms $notification) {
$transport = new ConexteoTransport(config('services.conexteo.dsn'));
$message = new SymfonySmsMessage($notification->toSms(), $notifiable->viaConexteoPhone());
$transport->send($message);
}
}
AppServiceProvider:
Notification::extend('conexteo', function ($app) {
return new ViaConexteoChannel();
});
.env config, service container, and basic notifications.conexteo:// DSN.Notification classes if using Option B.TransportException.Transport layer.throttle middleware).| Scenario | Impact | Mitigation |
|---|---|---|
| Conexteo API downtime | SMS delivery failures | Implement retry logic (Symfony Notifier has this). |
| Invalid DSN/config | All SMS fail silently | Validate DSN in bootstrap/app.php. |
| Rate limit exceeded | Throttled requests | Add exponential backoff in Transport. |
| Webhook delivery failures | Undetected failed SMS | Log web |
How can I help you explore Laravel packages today?