PHPackages                             nanson/yii2-messenger - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. nanson/yii2-messenger

ActiveYii2-extension[Queues &amp; Workers](/categories/queues)

nanson/yii2-messenger
=====================

Private messages module for yii2

1.0.2(8y ago)62663BSD-3-ClausePHP

Since Dec 19Pushed 8y ago4 watchersCompare

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

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

Yii2 Messenger
==============

[](#yii2-messenger)

Private messages module for yii2

Installing
----------

[](#installing)

The preferred way to install this extension is through Composer.

```
{
  "require": {
    "nanson/yii2-messenger": "*"
  }
}
```

Migration

```
./yii migrate --migrationPath=@vendor/nanson/yii2-messenger/migrations/

```

Configure module:

```
    'modules' => [
        'messenger' => [
            'class' => \nanson\messenger\Messenger::className(),
        ],
    ],

```

Usage
-----

[](#usage)

Url for contacts list: `/messenger/contacts/`.

[![Contacts](screenshots/contacts.png?raw=true "Contacts")](screenshots/contacts.png?raw=true)

Url for messages list: `/messenger/contacts/messages/?id={contact_id}`

[![Messages](screenshots/messages.png?raw=true "Messages")](screenshots/messages.png?raw=true)

### Contacts widget

[](#contacts-widget)

Display contacts list for user with last message.

```

```

OptionTypeDescriptionuserIdintegerUser ID. *Default:* `\Yii::$app->user->id `tplstringWidget template. *Default:* `create`optionsarrayThe HTML attributes for the widget wrapper tag. *Default:* `[]`pageSizeintegerContacts per page. *Default:* `10`defaultOrderarrayDefault contacts order *Default:* `['last_message_id' => SORT_DESC]`viewRoutestringRoute to messages. *Default:* `/messenger/contacts/messages`dataProviderOptionsarrayOptions for `yii\data\ActiveDataProvider`. *Default:* `[]`queryModifiercallableFunction to modify ActiveDataProvider query. *Default:* `null`skinAssetstringSkin Asset Bundles class. *Default:* `null`### Messages widget

[](#messages-widget)

Display user messages with current contact

```

```

OptionTypeDescriptioncontactIdintegerContact ID.userIdintegerUser ID. *Default:* `\Yii::$app->user->id `tplstringWidget template. *Default:* `messages`optionsarrayThe HTML attributes for the widget wrapper tag. *Default:* `[]`pageSizeintegerMessages per page. *Default:* `10`defaultOrderarrayDefault contacts order *Default:* `['created_at' => SORT_DESC]`dataProviderOptionsarrayOptions for `yii\data\ActiveDataProvider`. *Default:* `[]`queryModifiercallableFunction to modify ActiveDataProvider query. *Default:* `null`skinAssetstringSkin Asset Bundles class. *Default:* `null`### Add message widget

[](#add-message-widget)

Display form to message creation.

```

```

OptionTypeDescriptioncontactIdintegerContact ID.userIdintegerUser ID. *Default:* `\Yii::$app->user->id `tplstringWidget template. *Default:* `create`optionsarrayThe HTML attributes for the widget wrapper tag. *Default:* `[]`formOptionsarrayThe HTML attributes for the widget form. *Default:* `[]`routestringRoute to create message action. *Default:* `/messenger/rest/create`skinAssetstringSkin Asset Bundles class. *Default:* `null`pjaxIdstringPjax widget Id. If specified, pjax will be reloaded after message creation. *Default:* `null`fancySelectorstringFancybox selector. If specified, widget will be rendered as Fancybox.  *Default:* `null`fancyOptionsarrayFancybox widget options. *Default:* `null`### Messages counter widget

[](#messages-counter-widget)

Display count unreaded messages for user.

```

```

OptionTypeDescriptionroutestringRoute to action. *Default:* `/messenger/rest/count`timeoutintegerUpdate timout. *Default:* `30`tagstringCounter html tag. *Default:* `span`optionsarrayThe HTML attributes for the counter tag. *Default:* `['class' => 'badge']`

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

3263d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e89a929b5f4199f13d5198bfc9cf1ea0284462e078c6efd9a12b075ac215219?d=identicon)[nanson](/maintainers/nanson)

---

Top Contributors

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

---

Tags

messageyii2extensionmoduleyiimessagesPrivate MessagesMessenger

### Embed Badge

![Health badge](/badges/nanson-yii2-messenger/health.svg)

```
[![Health](https://phpackages.com/badges/nanson-yii2-messenger/health.svg)](https://phpackages.com/packages/nanson-yii2-messenger)
```

###  Alternatives

[trntv/yii2-command-bus

Yii2 Command Bus extension

57647.2k8](/packages/trntv-yii2-command-bus)[vision/yii2-private-messages

Private messages.

342.4k](/packages/vision-yii2-private-messages)

PHPackages © 2026

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