symfony/free-mobile-notifier
Symfony Notifier integration for Free Mobile SMS. Configure a freemobile:// DSN with your Free Mobile login, API key, and phone number to send notifications to your personal mobile via Free Mobile’s SMS notification service.
EventDispatcher) may require custom bindings or decorators.vonage/client or twilio/sdk. This package’s unique value lies in Free Mobile-specific optimizations (e.g., local number validation, EU pricing) and Symfony’s Notifier component, which simplifies integration for Laravel apps already using Symfony’s Messenger or similar async systems.SmsSentEvent). Laravel’s event system can be bridged with minimal effort..env pattern, reducing friction.symfony/http-client, symfony/event-dispatcher, etc. Laravel may require composer overrides or custom service providers to resolve conflicts.EventDispatcher differs from Laravel’s Event facade. A decorator pattern or event listener bridge will be needed.Mockery or Laravel’s testing helpers).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Dependency Conflicts | High | Use composer.json overrides or Laravel’s replace directive. Test with php artisan optimize. |
| Event System Gaps | Medium | Create a thin Symfony event adapter for Laravel’s Event facade or use Laravel’s Bus for event dispatching. |
| API Rate Limits | Medium | Implement Laravel’s throttle middleware or a custom rate-limiter for Free Mobile API calls. |
| Webhook Security | High | Validate Free Mobile’s IP ranges or use Laravel’s signed routes and verified middleware for webhook endpoints. |
| Localization | Low | Free Mobile’s API handles French/EU numbers; Laravel’s locale system can complement this for user-facing content. |
| Async Processing | Medium | Leverage Laravel’s queue system (e.g., database, redis) to handle async SMS delivery and retries. |
notifications) or another provider if Free Mobile fails?log channel, a custom free_mobile_logs table, or third-party monitoring (e.g., Datadog, Sentry).Mockery, Laravel’s testing helpers).Illuminate\Support\ServiceProvider. Bind Symfony’s Notifier and related services to Laravel’s container.FreeMobile) to wrap Symfony’s Notifier class, providing a Laravel-native interface (e.g., FreeMobile::sendSms($message)).config/free-mobile.php using Laravel’s publishes method in the service provider.symfony/http-client for API calls, but alias it to Laravel’s Http client to avoid conflicts. For event dispatching, create a Symfony-to-Laravel event adapter or use Laravel’s Bus for event handling.SmsSentEvent) to Laravel’s Event system. For example:
// In a service provider
$this->app->bind(
Symfony\Contracts\EventDispatcher\EventDispatcherInterface::class,
function ($app) {
return new LaravelEventDispatcher($app['events']);
}
);
free_mobile_logs table or extend Laravel’s failed_jobs table for async operations. Use Laravel’s Schema builder for migrations.database, redis) to handle async SMS delivery. Dispatch SMS jobs to the queue and process them via a worker (e.g., php artisan queue:work).Phase 1: Proof of Concept (1–2 weeks)
composer require symfony/free-mobile-notifier.Notifier to Laravel’s container..env (e.g., FREE_MOBILE_DSN=freemobile://LOGIN:API_KEY@default?phone=PHONE).Phase 2: Event System Integration (1 week)
EventDispatcher to Laravel’s Event system.SmsSentEvent, SmsFailedEvent) and dispatch Laravel events or log them.Phase 3: Async Processing (1 week)
SendSmsJob class to handle async delivery.ShouldQueue and HandleFailures interfaces.Phase 4: Webhook and Monitoring (1–2 weeks)
log channel or a custom table.Phase 5: Testing and Optimization (1–2 weeks)
Http tests or a mock Free Mobile API).symfony/http-client and symfony/event-dispatcher via composer, but alias them to avoid conflicts with Laravel’s native components.How can I help you explore Laravel packages today?