ipe/smsir-php
ipe/smsir-php is a PHP client for the SMS.ir API, offering a simple way to send SMS messages, handle verification codes, manage contacts and groups, and integrate SMS.ir into Laravel or standalone PHP applications with straightforward configuration.
Architecture fit
App\Contracts\SmsSender) as an anti-corruption layer. The package should never be referenced directly from controllers, jobs, or notification classes; that keeps the vendor swappable and makes the 16-star / 0-dependent supply-chain profile a non-issue architecturally.Integration feasibility
composer require, publish config, supply API key and line number, call the facade or injected client. Realistic integration is 1–3 developer days including tests, a verify template, and a fallback path.Technical risk
illuminate/* and Guzzle constraints against current Laravel (11/12) and PHP 8.2/8.3; a stale constraint set forces a fork or a replace entry. Auto-discovery and config-publish behavior should be checked against the target skeleton.Key questions
composer.json, and does the service provider use package auto-discovery?Http::fake) for CI, and is there a documented sandbox or test line?Stack fit
toSmsIr()) plus a lower-level client for non-notification use cases (marketing blasts, admin alerts).Migration path
SmsSender interface with domain-shaped methods (sendOtp, sendBulk, getBalance) — not vendor-shaped ones.SmsIrSender as a thin adapter delegating to the package; keep any incumbent provider as a second implementation.Compatibility
composer.json; run composer why-not against the current framework before committing.config/smsir.php leak into application code.Sequencing
Http::fake-based tests, exception mapping to internal error types.Maintenance
Support
Scaling
Failure modes
| Failure | Symptom | Mitigation |
|---|---|---|
| Gateway 5xx / timeout | Send failures spike, OTP funnel drops | Bounded retries with jitter, fallback provider, circuit breaker |
| Credit exhaustion | Uniform 4xx on all sends | Balance gauge + low-credit alert at 20% and 5% |
| Template/line rejection | 4xx on verify sends only | Validate templates in staging; pin template IDs in config |
| Rate limiting (429) | Bursts fail while steady traffic succeeds | Token-bucket limiter per traffic class; queue backpressure |
| Duplicate sends | Users receive repeated codes | Idempotency key per challenge; no retry on ambiguous 4xx |
| Delivery accepted but not delivered | 200 responses, low delivery rate | Delivery-report polling or webhook; alert on accept-vs-delivered divergence |
| PII leakage | Phone numbers / OTPs in logs | Redact at the adapter boundary; disable package debug logging |
| Geopolitical / access disruption | Composer install or gateway unreachable | Internal mirror of the package; secondary provider pre-integrated |
Ramp-up
Bottom line for a TPM: the package itself is a low-risk, low-differentiation commodity wrapper — the opportunity score reflects that the value sits in the integration discipline, not the library. Approve it only as an implementation detail behind an owned interface, with a fallback provider, a forked mirror, and the SMS.ir account (credit, lines, templates, regional access) treated as the actual production dependency.
How can I help you explore Laravel packages today?