simplesoftwareio/simple-sms
Simple SMS is a Laravel package for sending text messages through multiple SMS gateways. It offers a clean, driver-based API, configurable providers, and straightforward integration for notifications, alerts, and verification codes.
This release (3.1.1) is a maintenance bump: a Laravel 5.4 compatibility fix and one new carrier (US Cellular) in the carrier lookup table. Nothing in it changes the public API, so existing integrations keep working — but if you were pinned below 3.1.1 on a 5.4 app, bump the constraint.
Install and pin the version
composer require vendor/package:^3.1.1
On Laravel 5.4 you must also register the service provider manually in config/app.php (providers array) — auto-discovery only helps you from 5.5 onward. This is precisely what the "Laravel 5.4 Fix" addresses, so don't skip the bump and assume registration still works.
Publish config and set credentials
php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider"
Put any API key/timeout values in .env, not in the published config, and add them to .env.example so teammates and CI don't silently run with empty credentials.
Look first at: the config file (carrier list, cache driver, endpoint), the carrier enum/constant class (that's where US Cellular landed), and the package's changelog for the 5.4 fix details.
First use case — normalize a number, then resolve its carrier:
$phone = PhoneNumber::parse('+1 312 555 0142'); // always E.164
$carrier = Carrier::for($phone); // now may return US Cellular
Verify the happy path against a known US Cellular number before touching anything else; that single assertion tells you whether the new carrier map is live in your install.
Wrap the package, don't sprinkle it. Bind a thin CarrierResolver service in your container that takes the raw input, normalizes it, calls the package, and returns your own DTO. When the carrier list or method names shift in a future release, you edit one class instead of forty call sites.
Model casting / accessor pattern. For stored numbers, add a phone_carrier column and populate it in an observer or a dedicated job rather than in the request cycle — carrier lookups are I/O, and you don't want them on the hot path of a form submit.
Cache aggressively, key on E.164. Carrier lookups are effectively immutable per number short of porting. A Cache::remember("carrier:{$e164}", now()->addDays(30), ...) wrapper cuts cost and latency dramatically. Remember that ported numbers do change carrier, so pick a TTL you can defend (30–90 days) and invalidate on user profile updates.
Queue the enrichment. Dispatch a job on user creation/phone change; make it ShouldBeUnique keyed on the normalized number so a burst of signups doesn't fan out into duplicate lookups.
Validate before you look up. Run the number through your validator/normalizer first. Sending garbage to a lookup endpoint returns either an exception or a misleading "unknown" that pollutes your cache with a long TTL.
Testing. Freeze the carrier map in tests — assert against numbers you control, and use the package's fake/mock hook (or bind a stub CarrierResolver) so CI never hits the network. Add one test asserting US Cellular resolves, so a future regression in the carrier table surfaces immediately.
Upgrade workflow. Treat carrier-table releases as data updates, not code changes: bump, run your carrier test suite, deploy. Keep the composer constraint at ^3.1 so patch-level carrier additions flow through on your normal composer update cadence.
composer update is held back by other constraints, you can stay stuck on a broken provider registration without noticing. Run composer show vendor/package and confirm you're actually on 3.1.1+.config/app.php. Document it in the README of your app, not just here.US Cellular will show up in logs, exports, and possibly your UI. Don't compare against hard-coded strings across the codebase — compare against the package's constants or your own enum, or you'll be doing a find-and-replace on the next carrier rename.'unknown' / null) and make sure UI handles it before the marketing team asks why some users show a blank field.null rather than throwing in a request. A carrier lookup should never be able to 500 your signup form.^3.x minor slips a behavioral change past you. Skim the notes on every bump; the cost is thirty seconds.How can I help you explore Laravel packages today?