PHPackages                             baraja-core/country - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. baraja-core/country

ActiveLibrary[Localization &amp; i18n](/categories/localization)

baraja-core/country
===================

Country manager.

v1.0.8(1y ago)153.8k[1 PRs](https://github.com/baraja-core/country/pulls)3PHPPHP ^8.0

Since Jul 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/baraja-core/country)[ Packagist](https://packagist.org/packages/baraja-core/country)[ Docs](https://github.com/baraja-core/country)[ RSS](/packages/baraja-core-country/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (11)Versions (10)Used By (3)

   ![BRJ logo](https://camo.githubusercontent.com/813c67e02a7ab7e4dc900316a4521c3ddf5846fe2cabba7140f3f4b78afda198/68747470733a2f2f63646e2e62726a2e6170702f696d616765732f62726a2d6c6f676f2f6c6f676f2d6461726b2e706e67)
 [BRJ organisation](https://brj.app)

---

Country
=======

[](#country)

Country management package.

Idea
----

[](#idea)

This package provides an interface for working with countries. All countries always return as an entity that meets the Country interface. The specific implementation of the entity is decided by the package itself according to the available environment.

Possible implementations:

- DoctrineCountry
- FileCountry

The default country data is available in the json data file, according to which the data is subsequently updated.

Basic usage
-----------

[](#basic-usage)

The main control logic is in the `CountryManager` service, which provides communication and servicing of database entities.

The country information is stored in Doctrine entities, which are automatically generated on the first call based on a data file downloaded via the API.

We use the [country.io](http://country.io/data/) service to retrieve the data.

[![Country table](doc/table.png)](doc/table.png)

Usage:

```
$manager = new \Baraja\Country\CountryManager;
$manager->getByCode('CZ');
```

Returns:

[![Country entity](doc/entity.png)](doc/entity.png)

🏳️‍🌈 Flag support
-----------------

[](#️‍-flag-support)

The package fully supports the ability to get a country's flag as an emoji. To get it, simply call the method above the entity:

```
$manager = new \Baraja\Country\CountryManager;
$country = $manager->getByCode('CZ');

echo $country->getFlag(); // return 🇨🇿
```

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 93.5% 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 ~149 days

Recently: every ~246 days

Total

8

Last Release

699d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3382204?v=4)[baraja](/maintainers/baraja)[@baraja](https://github.com/baraja)

---

Top Contributors

[![janbarasek](https://avatars.githubusercontent.com/u/4738758?v=4)](https://github.com/janbarasek "janbarasek (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![ImgBotApp](https://avatars.githubusercontent.com/u/31427850?v=4)](https://github.com/ImgBotApp "ImgBotApp (1 commits)")

---

Tags

countrycountry-emojicountry-flagcountry-managementemoji-flagentityflaginternationalizationlocalelocalizationstate

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/baraja-core-country/health.svg)

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

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.0k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M491](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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