PHPackages                             wangchengtao/exception-notify - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. wangchengtao/exception-notify

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

wangchengtao/exception-notify
=============================

异常监控, 支持钉钉群机器人,飞书群机器人,企业微信群机器人, 以及自定义通道

v1.0.5(2mo ago)0151MITPHPPHP &gt;=7.2

Since Dec 16Pushed 2mo agoCompare

[ Source](https://github.com/wangchengtao/message-notify)[ Packagist](https://packagist.org/packages/wangchengtao/exception-notify)[ RSS](/packages/wangchengtao-exception-notify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (7)Used By (1)

消息通知组件
------

[](#消息通知组件)

功能
--

[](#功能)

- 支持多种通道(钉钉群机器人 飞书群机器人 企业微信群机器人)
- 支持扩展自定义通道

环境要求
----

[](#环境要求)

- php: &gt;= 7.2

安装
--

[](#安装)

```
composer require wangchengtao/message-notify
```

使用
--

[](#使用)

```
$channel = new Dingtalk([
    'access_token' => 'xxxxxxxxxxxxx',
    'auth_type' => 'sign', // 安全设置类型: keyword | sign
    'keyword' => '异常', // 当 auth_type 为 keyword 时，必填
    'secret' => 'xxxxxxxxxxxxxxxxxxxx', // 当 auth_type 为 sign 时，必填
    'at' => [], // 当 message 对象未指定@人员时，此为默认值
]);

$client = new Client($channel);

// 文本格式
$text = new DingtalkText();
$text->setTitle('测试');
$text->setContent('异常测试');
$text->setAt([
    '187*****897',
]);

$client->send($text);

// markdown 格式
$markdown = new DingtalkMarkdown();
$markdown->setTitle('Markdown消息标题');
$markdown->setContent("#### 这是Markdown消息内容 \n ![图片](https://example.com/image.png)");
$markdown->atAll();

$client->send($markdown);
```

效果图
---

[](#效果图)

[![效果图](assets/text.png)](assets/text.png)[![效果图](assets/markdown.png)](assets/markdown.png)

自定义通道
-----

[](#自定义通道)

- 所有自定义通道继承自 `AbstractChannel`
- 所有自定义消息继承自 `AbstractMessage`

```
use Summer\MessageNotify\Channel\AbstractChannel;
use Summer\MessageNotify\Message\AbstractMessage;

class CustomChannel extends AbstractChannel
{
    public function handleResponse(ResponseInterface $response): void
    {
        //
    }

    public function notify(AbstractMessage $message): ResponseInterface
    {
        //
    }
}

class CustomMessage extends AbstractMessage
{
    public function getBody() : array
    {
        //
    }
}

$message = new CustomMessage();
$message->setTitle('自定义标题');
$message->setContent('自定义消息');

$channel = new CustomChannel([
    'access_token' => 'xxxxxxxxxxxxx',
]);

$client = new Client($channel);

$client->send($text);
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance86

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

6

Last Release

75d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2401b92a15ab0ec8abf74a063fd79206aa50dc5ff912c653171127474bcd78d0?d=identicon)[wangchengtao](/maintainers/wangchengtao)

---

Top Contributors

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

---

Tags

exceptionnotifydingtalkFeishu

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wangchengtao-exception-notify/health.svg)

```
[![Health](https://phpackages.com/badges/wangchengtao-exception-notify/health.svg)](https://phpackages.com/packages/wangchengtao-exception-notify)
```

###  Alternatives

[spatie/flare-client-php

Send PHP errors to Flare

177148.0M15](/packages/spatie-flare-client-php)[facade/flare-client-php

Send PHP errors to Flare

51899.9M4](/packages/facade-flare-client-php)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

682104.9k7](/packages/guanguans-notify)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19372.5k](/packages/facile-it-sentry-module)

PHPackages © 2026

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