- What is malico/mobile-cm-php used for?
- malico/mobile-cm-php is a small PHP package for determining a Cameroon phone number's mobile network operator, typically from mobile prefix mappings. It is not a full Laravel package with service providers or facades, so Laravel applications should call it through an application-owned adapter or service class. It is best treated as an optional enrichment tool rather than a core dependency.
- How do I install malico/mobile-cm-php in a Laravel app?
- Install it with Composer using composer require malico/mobile-cm-php, then call it from a Laravel service, action, or job rather than directly from controllers or Blade views. Because the package does not appear to ship Laravel-specific integration, you will usually write a thin MobileNetworkResolver adapter and bind it in a service provider. Confirm the package's PHP constraint against your Laravel runtime before adopting it.
- Does malico/mobile-cm-php include Laravel service providers, facades, or config publishing?
- There is no evidence in the provided context of a Laravel service provider, facade, config publishing, or validation rules. That means installation is mostly Composer plus your own adapter code. Keep the package behind an interface so you can replace it with an internal prefix table or API later.
- Which PHP and Laravel versions does malico/mobile-cm-php support?
- The provided information does not confirm which PHP or Laravel versions are supported, and the last release was in September 2021. You should inspect the Composer constraints and run CI against your exact production PHP version. If the package targets an older PHP version, a maintained fork may be safer than changing your runtime.
- Which Cameroon mobile networks and prefixes are supported?
- The package is described as Cameroon-only and is likely built around a static mobile prefix map. The exact list of supported networks and prefixes is not included in the provided context, so validate representative numbers for each operator you care about. Treat new allocations and numbering-plan changes as data-freshness risks.
- Does it handle country codes, leading zeros, spaces, and number portability?
- The provided context does not confirm handling for country codes, leading zeros, spaces, formatting, or number portability. In Laravel, normalize numbers before calling the package and define how you will handle ported or unrecognized numbers. Number portability is a realistic accuracy risk for any prefix-based lookup.
- Is malico/mobile-cm-php safe to use in production?
- Use it cautiously in production. The repository has low adoption signals, no dependents indicated, and a stale release history, so maintainer abandonment is a realistic risk. MIT licensing helps, but you should pin the version, wrap the package, add a fallback path, and monitor upstream changes.
- How should I test or validate its operator lookup accuracy?
- Run a discovery spike with representative Cameroon phone numbers and expected network results before integrating. Then add unit tests around your adapter for normalization, unresolved numbers, and malformed input. For migration, run the package in shadow mode against any existing prefix table or third-party lookup and compare accuracy before switching.
- What happens if the mobile network cannot be resolved?
- The provided context does not specify the exact fallback behavior when a network cannot be resolved. Your adapter should define a clear result such as unknown, null, or a domain-specific enum, and log enough context without exposing personal phone numbers unnecessarily. Also decide whether the user flow should continue or ask for manual operator selection.
- Are there alternatives or a recommended long-term maintenance plan?
- Alternatives include an application-owned Cameroon prefix table, a maintained fork of this package, or a third-party phone-number lookup API. Given the stale release history, plan for long-term ownership rather than assuming upstream support. Keep the package behind an interface so switching to an internal table or API is straightforward.