承接 wangchengtao/exception-notify 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wangchengtao/exception-notify

最新稳定版本:v1.0.5

Composer 安装命令:

composer require wangchengtao/exception-notify

包简介

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

README 文档

README

功能

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

环境要求

  • php: >= 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);

效果图

效果图 效果图

自定义通道

  • 所有自定义通道继承自 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);

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固