SmsSender in constructor), which is clean but may introduce tight coupling if the SMS provider (Eskiz) becomes a bottleneck or requires future changes.SmsSender), making it harder to swap providers later. This could lead to vendor lock-in if Eskiz’s API changes or if the team needs to support multiple SMS gateways.SmsSentEvent). This could complicate use cases requiring reliability (e.g., transactional SMS).symfony/http-client, symfony/dotenv, etc.ServiceProvider or Facade integration), so manual wiring is needed..env (e.g., ESKIZ_EMAIL, ESKIZ_PASSWORD), which is fine for single-provider setups but inflexible for multi-environment or multi-gateway needs.symfony/http-client mocks) or a test double for SmsSender.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Vendor Lock-in | High | Abstract SmsSender behind an interface. |
| No Async Support | Medium | Wrap in a queue job (Laravel Queues). |
| Error Handling | Medium | Add middleware/retries for HTTP failures. |
| Lack of Docs | Low | Supplement with internal runbooks. |
| Symfony Version Risk | Low | Pin Symfony deps in composer.json. |
ESKIZ_PASSWORD and other credentials properly rotated and masked in logs?SmsSender in a job).symfony/http-client: Used for Eskiz API calls. Laravel’s Http facade can coexist but may require aliasing.symfony/dotenv: .env support is redundant in Laravel (use Laravel’s .env system instead).laravel-notification-channels/sms (more mature, supports multiple providers).SmsSender with a test double (e.g., mock Eskiz API responses)..env with Laravel’s config system (e.g., config/sms.php).SmsSender behind an interface to enable provider swapping:
interface SmsGatewayInterface {
public function send(string $to, string $message): bool;
}
retry helper or a decorator pattern.spatie/fractal).| Component | Compatibility Status | Notes |
|---|---|---|
| Laravel 10.x | ✅ Yes | Symfony 6.2 deps are compatible. |
| Laravel Queues | ✅ Yes | Wrap SmsSender in a job for async. |
| Laravel Notifications | ⚠️ Partial | Not integrated; manual wiring needed. |
| PHP 8.1+ | ✅ Yes | Hard requirement. |
| Eskiz API | ✅ Yes | Direct HTTP calls to Eskiz. |
symfony/http-client is installed (Laravel 10+ includes it).composer require amirjon/sms-bundleconfig/bundles.php..env with Laravel’s config (avoid Symfony’s dotenv).composer update required (risk of breaking changes).symfony/yaml).composer why-not to detect conflicts.$sender->send($to, $message); // Log start
try {
$response = $sender->send($to, $message);
} catch (Exception $e) {
// Log error + retry logic
}
send() blocks until Eskiz responds (~100–500ms latency).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Eskiz API Downtime | SMS delivery failures | Queue jobs + fallback provider. |
How can I help you explore Laravel packages today?