cyberwings/myanmar-phone-number-php
A PHP package for working with Myanmar phone numbers: validate, normalize, format, and parse local and international numbers. Helps Laravel and PHP apps handle user input, clean stored values, and display consistent Myanmar mobile numbers.
Architecture fit. This is a narrow, single-purpose utility library: validate a Myanmar mobile number, derive the operator, normalize the input, and report the network type (2G/3G/4G/5G). It has no persistence, no I/O, and (based on the port-of-Python origin) almost certainly no framework coupling beyond an optional Laravel service provider and facade. That makes it architecturally cheap to adopt — it slots in as a pure function at the edges of a system (request validation, data ingestion, ETL normalization) and does not impose a model, schema, or lifecycle on the host application. From a TPM standpoint this is the best kind of dependency: small surface area, easy to remove.
Integration feasibility. Composer-installable with Laravel package auto-discovery. Realistic effort to first working call is under a day for a competent PHP developer: install, construct a test harness of known-good and known-bad numbers, confirm output shape. The integration cost is not engineering time — it is the cost of establishing trust in the output, which is where this package is weak.
Technical risk. Several, in ascending severity:
Key questions to put to the maintainer (or answer by inspection).
composer.json, and is there a tested upper bound? Does it run on PHP 8.2/8.3 and Laravel 10/11/12?09…, +959…, 959… and 9… input variants, and malformed/short input?Stack fit. The natural placement is as an adapter behind your own interface, not as a direct call scattered through controllers. Concretely: a MyanmarPhoneNormalizer / PhoneNumberService contract in your domain layer, with this package as one implementation. That single decision converts an unmaintained dependency from a liability into a swappable detail, and it is the difference between a one-hour migration later and a week-long one.
Typical leverage points, in order of value:
+959…) in the database, display in local format. Do this once, centrally, and never again. This is where most of the durable product value sits, and it does not actually require this package — any normalizer works.Migration path. Treat adoption as reversible by construction. Phase 1: install, wrap behind the internal interface, no direct references outside the adapter. Phase 2: run it in parallel against a general-purpose library on real traffic and diff the outputs. Phase 3: decide.
Compatibility baseline. Establish your own minimum — target PHP 8.1+ and the Laravel version you actually run — rather than accepting whatever the package declares. If the package's constraints block your platform upgrade path, that alone disqualifies it; do not pin your framework to an abandoned utility library.
Sequencing.
giggsey/libphonenumber-for-php (the port of Google's libphonenumber, which carries Myanmar metadata and is heavily maintained). Measure where they disagree. Disagreement on validity is a red flag for this package; disagreement on operator is expected and tells you which one you trust.Maintenance. Assume you will own this code within twelve months. Budget for a fork, a prefix-table refresh process, and a named owner. If you cannot fund that, use libphonenumber for validation and normalize everything else yourself; the validation half of this package is not distinctive enough to justify a bespoke maintenance burden.
Support. No SLA, no vendor, no issue-triage guarantee. Escalation path is "read the source." Acceptable for a utility; not acceptable where a support contract or compliance obligation attaches to the outcome.
Scaling. Negligible cost. Pure CPU string parsing with no I/O, no external calls, no state. It will not be your bottleneck at any realistic volume. If you fork it, load the prefix table once at boot rather than per-call, and you are done.
Failure modes — ranked by business impact.
+95/95/0 prefixes, and copy-pasted formatting. Test explicitly; sanitization is the feature most likely to be quietly incomplete.Ramp-up. A developer is productive in under an hour; the API is a handful of functions. The real onboarding cost is domain knowledge — a new engineer needs to understand the Myanmar operator landscape and why the prefix table is political as well as technical. Document that once, next to the adapter, or you will re-litigate it every time the data looks wrong.
TPM recommendation. Do not adopt this as a production dependency in its current state. The opportunity is real — Myanmar-facing products genuinely need number normalization, and operator awareness has legitimate value for SMS cost and deliverability — but this package is under-validated, single-maintainer, and carries a data-freshness risk it cannot self-correct. The low-risk play: adopt giggsey/libphonenumber-for-php for validation and formatting, build your own thin normalization layer, and vendor this package's operator table (with attribution, license permitting) as a supplementary, clearly-caveated enrichment source that you own and refresh. That preserves the differentiated capability, removes the abandonment risk, and keeps the decision reversible.
How can I help you explore Laravel packages today?