PHPackages                             alldigitalrewards/country-mapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. alldigitalrewards/country-mapper

ActiveLibrary

alldigitalrewards/country-mapper
================================

Country Mapper Library

1.11.0(1y ago)06.4k↓37.9%1MITPHPPHP ^7.0|^8.0

Since Aug 25Pushed 1y ago3 watchersCompare

[ Source](https://github.com/alldigitalrewards/country-mapper)[ Packagist](https://packagist.org/packages/alldigitalrewards/country-mapper)[ RSS](/packages/alldigitalrewards-country-mapper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (24)Used By (1)

Country Mapper Library
======================

[](#country-mapper-library)

This is a Country mapper which maps a Country Alpha or Numeric code

Install
-------

[](#install)

Via Composer

```
$ composer require alldigitalrewards/country-mapper
```

Usage
-----

[](#usage)

```
These calls throw CountryMapperException

**Get Whitelisted Iso**:

$iso = (new CountryInputMapperService())->getWhitelistedIso(840);
$this->assertSame('840', $iso);

**Get Whitelisted Alpha2**:

$alpha = (new CountryInputMapperService())->getWhitelistedAlpha2('US');
$this->assertSame('US', $alpha);

**Get Country by Input (accepts iso/alpha2)**:

$country = (new CountryInputMapperService())->getMappedCountry('840');
$this->assertInstanceOf(Country::class, $country);
$this->assertSame('US', $country->getAlpha2());
$this->assertSame('840', $country->getNumeric());
```

Testing
-------

[](#testing)

```
$ composer test
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance40

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 73.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Total

16

Last Release

501d ago

PHP version history (2 changes)1.0.0PHP ^7.3|^8.0

1.4.0PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2b92b5a53a8e8f3b2e4065273a99f31fe19b950eb058cd1bd620cde48399420?d=identicon)[Houghtelin](/maintainers/Houghtelin)

![](https://www.gravatar.com/avatar/824513e4f32e579f28bf655454ad6bf9ccd1e7c3becc5c21420625b0e13a09ee?d=identicon)[zwalden](/maintainers/zwalden)

![](https://www.gravatar.com/avatar/796fe3ffb035a9d0387d5d055edd60464f869961f983b2edbdf3b42a2abd6b9b?d=identicon)[jmuto2](/maintainers/jmuto2)

---

Top Contributors

[![jmuto2](https://avatars.githubusercontent.com/u/12384482?v=4)](https://github.com/jmuto2 "jmuto2 (34 commits)")[![nicholasmejia](https://avatars.githubusercontent.com/u/148650100?v=4)](https://github.com/nicholasmejia "nicholasmejia (7 commits)")[![jhoughtelin](https://avatars.githubusercontent.com/u/6137941?v=4)](https://github.com/jhoughtelin "jhoughtelin (5 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/alldigitalrewards-country-mapper/health.svg)

```
[![Health](https://phpackages.com/badges/alldigitalrewards-country-mapper/health.svg)](https://phpackages.com/packages/alldigitalrewards-country-mapper)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
