PHPackages                             rteeom/isoflags - 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. rteeom/isoflags

ActiveLibrary

rteeom/isoflags
===============

library for easy emoji flags generation from iso country codes

v1.3.2(4mo ago)15001MITPHPPHP ^8.4CI passing

Since Mar 18Pushed 4mo ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (20)Used By (1)

IsoFlags
========

[](#isoflags)

[![License](https://camo.githubusercontent.com/74db61ac8f6c200b8d575d03090d072241f8acd8e4b7aa67b4f35f3258fb8094/68747470733a2f2f706f7365722e707567782e6f72672f727465656f6d2f69736f666c6167732f6c6963656e7365)](https://packagist.org/packages/rteeom/isoflags)[![Latest Stable Version](https://camo.githubusercontent.com/be525f9e30c9314e0ed2bf0b42e1e78240cd6cd8903f83f84383d6dcd729b468/68747470733a2f2f706f7365722e707567782e6f72672f727465656f6d2f69736f666c6167732f762f737461626c65)](https://packagist.org/packages/rteeom/isoflags)[![Total Downloads](https://camo.githubusercontent.com/dfcc1916733cf331e631571d0b2d9541740b07891b0a47c4c1c32cdfcd28adf7/68747470733a2f2f706f7365722e707567782e6f72672f727465656f6d2f69736f666c6167732f646f776e6c6f616473)](https://packagist.org/packages/rteeom/isoflags)[![Tests](https://github.com/mainstreamer/isoflags/actions/workflows/tests.yml/badge.svg)](https://github.com/mainstreamer/isoflags/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/eb6ef1e91de559685cba637b61366b7b1b7d0003b4c11e8d16f8d5d9915c7846/68747470733a2f2f636f6465636f762e696f2f67682f6d61696e73747265616d65722f69736f666c6167732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/mainstreamer/isoflags)[![PHP Version](https://camo.githubusercontent.com/6e44ad49e5307c87d1393389feb52ab61c99956e2e5f8c77177b2501f1d3d47f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e342d3838393242462e737667)](https://php.net/)

A modern PHP library for generating emoji flags from ISO 3166-1 alpha-2 country codes and extended regional codes.

Features
--------

[](#features)

- 🚀 Generate emoji flags from ISO country codes
- 🌍 Extended regional codes support (Kosovo, Ascension Island, etc.)
- 🛡️ Type-safe with PHP 8.4 enums
- ✅ 100% test coverage
- 📦 **Zero dependencies** - only requires PHP 8.4+

Installation
------------

[](#installation)

```
composer require rteeom/isoflags
```

**Requirements:** PHP 8.4 or higher

Quick Start
-----------

[](#quick-start)

```
use Rteeom\FlagsGenerator\FlagsGenerator;

// Generate emoji flags
echo FlagsGenerator::getFlag('gb'); // 🇬🇧
echo FlagsGenerator::getFlag('ua'); // 🇺🇦
echo FlagsGenerator::getFlag('us'); // 🇺🇸

// Safe usage (returns null for invalid codes)
$flag = FlagsGenerator::getFlagOrNull('invalid'); // null
```

### Extended Regional Codes

[](#extended-regional-codes)

```
use Rteeom\FlagsGenerator\FlagsGenerator;
use Rteeom\FlagsGenerator\Enums\CodeSet;

// Kosovo, Ascension Island, and more
echo FlagsGenerator::getFlag('xk', CodeSet::EXTENDED); // 🇽🇰
echo FlagsGenerator::getFlag('ac', CodeSet::EXTENDED); // 🇦🇨
```

### Validation

[](#validation)

```
use Rteeom\FlagsGenerator\CountryCodeValidator;

$isValid = CountryCodeValidator::isValidCountryCode('gb'); // true
$isValid = CountryCodeValidator::isValidCountryCode('invalid'); // false
```

Documentation
-------------

[](#documentation)

📚 **[Read the full documentation →](https://mainstreamer.github.io/isoflags)**

- [Installation Guide](https://mainstreamer.github.io/isoflags/getting-started/installation/)
- [Quick Start](https://mainstreamer.github.io/isoflags/getting-started/quick-start/)
- [Usage Examples](https://mainstreamer.github.io/isoflags/usage/basic-usage/)
- [API Reference](https://mainstreamer.github.io/isoflags/api-reference/)
- [Extended Codes](https://mainstreamer.github.io/isoflags/usage/extended-codes/)

Development
-----------

[](#development)

### Run Tests

[](#run-tests)

```
./vendor/bin/phpunit
```

### Code Quality

[](#code-quality)

```
make qa  # Run all quality checks
```

See [Contributing Guide](https://mainstreamer.github.io/isoflags/development/contributing/) for details.

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for version history.

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE) file for details.

Contributing
------------

[](#contributing)

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

Support
-------

[](#support)

- 🐛 [Report bugs](https://github.com/mainstreamer/isoflags/issues)
- 💡 [Request features](https://github.com/mainstreamer/isoflags/issues)
- 📧 Email:

---

Made with ❤️ by [Rteeom](https://github.com/mainstreamer)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance76

Regular maintenance activity

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% 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 ~151 days

Recently: every ~0 days

Total

15

Last Release

129d ago

PHP version history (5 changes)1.0.2PHP ^7.2

1.1.0PHP ^7.4

1.1.3PHP ^7.4|^8.0

1.1.4PHP ^7.4|8.\*

v1.3.0.x-devPHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dc932a1700526fbf4cf88efc3959dac21499c36ea1d458b02bea0ee6855c04a?d=identicon)[rteeom](/maintainers/rteeom)

---

Top Contributors

[![mainstreamer](https://avatars.githubusercontent.com/u/6151431?v=4)](https://github.com/mainstreamer "mainstreamer (18 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rteeom-isoflags/health.svg)

```
[![Health](https://phpackages.com/badges/rteeom-isoflags/health.svg)](https://phpackages.com/packages/rteeom-isoflags)
```

PHPackages © 2026

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