andreybolonin/sms-gateway-bundle
SimpleSoftwareIO/simple-sms. This introduces architectural misalignment—Laravel’s service container, dependency injection, and event systems differ fundamentally from Symfony’s. The bundle’s reliance on Symfony’s Bundle structure (e.g., DependencyInjection, ContainerAware) may require significant abstraction layers or forks to integrate cleanly.SmsGatewayBundle would need to be adapted into a Laravel Service Provider (register()/boot() methods).config.yml must map to Laravel’s config/sms.php (or similar). The bundle’s Extension class would require rewriting to use Laravel’s mergeConfigFrom.ContainerAware services must be replaced with Laravel’s bindings or facades.sunra/turbosms-soapgate-client-php) are unmaintained or tied to Symfony. Laravel may need polyfills or direct API calls.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony-Laravel Gap | Critical | Fork/rebuild as a Laravel package; test thoroughly. |
| Deprecated Dependencies | High | Pin versions or replace with Laravel-compatible SDKs. |
| Provider SDK Issues | Medium | Pre-integration testing with each provider. |
| Configuration Overhead | Medium | Abstract into a Laravel-friendly config system. |
| Maintenance Burden | High | Assign ownership; monitor for Symfony updates. |
vonage/cloud-api-sdk, mattstauffer/laravel-telegram)? What unique value does this bundle offer?EventDispatcher be replaced in Laravel? (Laravel uses its own event system.)dev-master branches)?shouldQueue() for SMS jobs)?SmsGatewayBundle as a Laravel ServiceProvider with:
public function register() {
$this->mergeConfigFrom(__DIR__.'/config/sms.php', 'sms');
$this->app->bind('sms.gateway', function ($app) {
return new GatewayManager($app['config']['sms']);
});
}
SmsGateway facade for fluent access:
use Illuminate\Support\Facades\Facade;
class SmsGateway extends Facade { protected static function getFacadeAccessor() { return 'sms.gateway'; } }
config/sms.php:
'providers' => [
'default' => 'nexmo',
'nexmo' => [
'key' => env('NEXMO_KEY'),
'secret' => env('NEXMO_SECRET'),
],
],
vonage/cloud-api-sdk instead of Symfony’s twilio/sdk.connect-corp/nexmo-client with vonage/php-sdk.arcturial/clickatell (if maintained) or direct API calls.guzzlehttp/guzzle for direct API integration.GatewayManager class to Laravel’s DI.Extension, ContainerAware).laravel-sms-gateway) to avoid confusion.parameters.yml with Laravel’s .env system.| Step | Task | Dependencies |
|---|---|---|
| 1 | Fork repository | None |
| 2 | Rewrite ServiceProvider |
Symfony Extension → Laravel config |
| 3 | Replace ContainerAware with Laravel bindings |
Step 2 |
| 4 | Adapt provider SDKs | Step 3 |
| 5 | Implement facade | Step 4 |
| 6 | Add queue/job support | Laravel Queue system |
| 7 | Write tests | All steps |
| 8 | Publish as new package | Step 7 |
sunra/turbosms) are abandoned; replace with direct API calls if needed.config.yml vs. Laravel’s .env/config/ may cause confusion. Document migration steps clearly.[SmsGateway] Provider "twilio" failed: Guzzle error [401] Unauthorized.
$gateway->send('+1234', 'Hello', ['provider' => 'nexmo']);
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Provider API Outage | SMS delivery fails | Implement retry logic + fallback providers. |
| Configuration Error | Silent failures | Validate config on boot; use Laravel’s validate() helpers. |
| Deprecated SDK | Breaking changes | Monitor SDK health; replace proactively. |
| Queue Worker Crash | Undelivered SMS | Use Laravel’s failed_jobs table + |
How can I help you explore Laravel packages today?