PHPackages                             uniqby/yii2-phone-formatter - 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. uniqby/yii2-phone-formatter

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

uniqby/yii2-phone-formatter
===========================

Phone numbers formatter and behavior for Yii2 Framework

0.2.1(10y ago)317.0k↑134.7%2MITPHP

Since Nov 27Pushed 10y ago2 watchersCompare

[ Source](https://github.com/uniqby/yii2-phone-formatter)[ Packagist](https://packagist.org/packages/uniqby/yii2-phone-formatter)[ RSS](/packages/uniqby-yii2-phone-formatter/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

yii2-phone-formatter
====================

[](#yii2-phone-formatter)

Phone numbers formatter and behavior for Yii2 Framework

### Composer

[](#composer)

The preferred way to install this extension is through [Composer](http://getcomposer.org/).

Either run

```
php composer.phar require uniqby/yii2-phone-formatter "dev-master"

```

or add

```
"uniqby/yii2-phone-formatter": "dev-master"

```

to the require section of your `composer.json`

Configuration
-------------

[](#configuration)

### Configure your application in common config:

[](#configure-your-application-in-common-config)

```
'components' => [
    'formatter' => [
        'class' => 'uniqby\phoneFormatter\i18n\Formatter',
    ]
]
```

Now you can use asPhoneE164 and asPhoneInt methods

```
echo \Yii::$app->formatter->asPhoneE164(
    '+375259862464',
    'BY'
);

echo \Yii::$app->formatter->asPhoneInt(
    '+375 25 986-24-64',
    'BY'
);
```

### Behavior

[](#behavior)

You can add behavior to your models

```
/**
 * @inheritdoc
 */
public function behaviors()
{
    return [
        'convertPhone' => [
            'class' => PhoneFormatterBehavior::className(),
            'attributes' => [
                'number'
            ]
        ]
    ];
}
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~65 days

Total

3

Last Release

3741d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/813c91997e0461062cb4c1bc3863b54d1bc51cf4dbe80fe1d33e3fefd95f6ef7?d=identicon)[uniqby](/maintainers/uniqby)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/uniqby-yii2-phone-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/uniqby-yii2-phone-formatter/health.svg)](https://phpackages.com/packages/uniqby-yii2-phone-formatter)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.8k58](/packages/skeeks-cms)[fleetbase/fleetops-api

Fleet &amp; Transport Management Extension for Fleetbase

1731.5k7](/packages/fleetbase-fleetops-api)

PHPackages © 2026

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