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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alldigitalrewards/country-mapper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

Country Mapper Library

1.11.0(1y ago)08.1k↓65.5%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 today

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 84% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

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

548d 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.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k124](/packages/oat-sa-tao-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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