avtonom/sms-devinotelecom-bundle
KPhoenSmsSenderBundle), making it a poor fit for modern Laravel applications. Laravel’s service container, dependency injection, and event systems are fundamentally different from Symfony’s.Container with Laravel’s ServiceProvider/Facade.KPhoenSmsSenderBundle dependencies (e.g., Monolog → Laravel’s Log facade).EventDispatcher and DependencyInjection are incompatible with Laravel’s Events/Service Container.guzzlehttp/guzzle) achieve the same with less friction?WrappedException map to Laravel’s Illuminate\Support\MessageBag or custom exceptions?send() blocking requests)?ContainerInterface or EventDispatcher.use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'Bearer ' . $this->getAuthToken(),
])->post('https://api.devinotelecom.com/send', [
'phone' => '0642424242',
'text' => 'Test SMS',
]);
CurlHttpAdapter) into a Laravel service.class DevinoTelecomAdapter {
public function sendSms(string $phone, string $message): array {
$ch = curl_init('https://api.devinotelecom.com/send');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'phone' => $phone,
'text' => $message,
'login' => config('sms.devinotelecom.login'),
'password' => config('sms.devinotelecom.password'),
]);
return json_decode(curl_exec($ch), true);
}
}
KPhoenSmsSenderBundle with Laravel’s queue system for async SMS.use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class SendSms implements ShouldQueue {
use Dispatchable, Queueable;
public function handle() {
$adapter = new DevinoTelecomAdapter();
$adapter->sendSms($this->phone, $this->message);
}
}
Monolog with Laravel’s Log facade:
\Log::error('SMS failed', ['error' => $e->getMessage()]);
| Feature | Symfony Bundle | Laravel Equivalent | Notes |
|---|---|---|---|
| Dependency Injection | Container |
ServiceProvider/bind() |
Manual binding required. |
| Event System | EventDispatcher |
Laravel Events | Replace sms.sender events with custom ones. |
| Configuration | YAML/XML | .env + config/services.php |
Use Laravel’s config caching. |
| HTTP Client | cURL/Buzz | Guzzle | Native Laravel support. |
| Logging | Monolog | Monolog (via Log facade) |
Direct replacement. |
DevinoTelecomService class in Laravel.Illuminate\Support\MessageBag.spatie/laravel-queue-retries).avtonom_sms.logger with Laravel’s Log + Sentry/Laravel Debugbar.spatie/laravel-rate-limiting).symfony/monolog-bundle) may conflict with Laravel’s Monolog.KPhoenSmsSenderBundle is unmaintained; future Symfony BC breaks could cascade.EventDispatcher internals).SendSms job) and use Redis for rate limiting.memory pool.$schedule->call(function () {
$balance = $this->devinoService->getBalance();
\Log::info("Devino Telecom balance: {$balance}");
})->hourly();
| Risk | Mitigation Strategy |
|---|---|
| API Rate Limits | Use spatie/laravel-rate-limiting + queue retries. |
| Auth Token Expiry | Implement token refresh logic in DevinoTelecomAdapter. |
| HTTP Timeouts | Set Guzzle timeout: $client->timeout(30). |
| Queue Failures | Use failed_jobs table + dead-letter queue. |
| **Symfony BC Breaks |
How can I help you explore Laravel packages today?