PHPackages                             kriss/yii2-beary-chat - 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. kriss/yii2-beary-chat

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

kriss/yii2-beary-chat
=====================

yii2 bearyChat component

1.0(9y ago)2111MITPHP

Since Jul 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/krissss/yii2-beary-chart)[ Packagist](https://packagist.org/packages/kriss/yii2-beary-chat)[ Docs](https://github.com/krissss/yii2-beary-chart)[ RSS](/packages/kriss-yii2-beary-chat/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

yii2 bearyChat
==============

[](#yii2-bearychat)

yii2 bearyChat 组件，依赖[BearyChat for PHP](https://github.com/ElfSundae/BearyChat)

安装
--

[](#安装)

推荐使用 [composer](http://getcomposer.org/download/).

```
php composer.phar require --prefer-dist kriss/yii2-beary-chat "*"

```

或添加下面代码到`composer.json`文件

```
"kriss/yii2-beary-chat": "*"

```

然后使用

```
php composer.phar update

```

使用方式
----

[](#使用方式)

### 单独使用

[](#单独使用)

1.进行配置

basic 模版为 config/web.php, advanced 模版为对应入口的 config/main.php

示例配置如下：

```
'components' => [
    .....
    'bearyChat' => [
        'class' => 'kriss\bearyChat\Incoming',
        'clients' => [
            'default' => [
                'webhook' => 'https://hook.bearychat.com/=XXXX/incoming/XXXXXXXXXXXXXX',
                 'message_defaults' => [
                     'attachment_color' => '#f5f5f5',
                 ]
            ],
            // 'admin' => [
            //     'webhook' => '',
            // ],
        ]
    ],
    ...
]
```

2.进行使用

最简单的使用方式：

```
Yii::app->bearyChat->client()->sendMessage(json_encode(['text'=>'hello world']));
```

更多使用方式参看： [BearyChat for PHP](https://github.com/ElfSundae/BearyChat)

tips:`Yii::app->bearyChat->client()`获得的即是`\ElfSundae\BearyChat\Client`

### 配合 yii2-thread 使用

[](#配合-yii2-thread-使用)

发送一条 BearyChat 消息实际上是向 Incoming Webhook 发送同步 HTTP 请求，所以这在一定程度上会延长应用的响应时间。可以使用 yii2-thread （或任意多线程方式）来异步发送消息。

使用 yii2-thread 只需要在对应位置使用发送消息的代码就可以，使用方式不变

参考链接：[yii2-thread](https://github.com/krissss/yii2-thread)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3639d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4053cfc9956b8c15b9bc4c9c7c2bad625d16d1b6d9191019b2a25cc0972d955?d=identicon)[kriss](/maintainers/kriss)

---

Top Contributors

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

---

Tags

bearychatyii2-bearychatyii2-extensionyii2robotbearychatincoming webhook

### Embed Badge

![Health badge](/badges/kriss-yii2-beary-chat/health.svg)

```
[![Health](https://phpackages.com/badges/kriss-yii2-beary-chat/health.svg)](https://phpackages.com/packages/kriss-yii2-beary-chat)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1454.6k](/packages/dmstr-yii2-cookie-consent)[imanilchaudhari/yii2-currency-converter

This extension will help to find out current currency conversion rate.

1911.7k](/packages/imanilchaudhari-yii2-currency-converter)

PHPackages © 2026

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