PHPackages                             tourze/wechat-work-push-bundle - 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. tourze/wechat-work-push-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

tourze/wechat-work-push-bundle
==============================

企业微信应用推送模块

0.0.3(5mo ago)00MITPHPCI passing

Since Jun 3Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/wechat-work-push-bundle)[ Packagist](https://packagist.org/packages/tourze/wechat-work-push-bundle)[ RSS](/packages/tourze-wechat-work-push-bundle/feed)WikiDiscussions master Synced 1mo ago

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

WeChatWorkPushBundle
====================

[](#wechatworkpushbundle)

\[[![PHP Version](https://camo.githubusercontent.com/f870cee2a2e2a442c6b62c8bf79f45ec0ce794dc5af13834902518c9107230f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312532422d626c75652e737667)](https://camo.githubusercontent.com/f870cee2a2e2a442c6b62c8bf79f45ec0ce794dc5af13834902518c9107230f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312532422d626c75652e737667)\] () [![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)\[[![Build Status](https://camo.githubusercontent.com/280d6a8b0e729882b4a69c062537a84c6bdd8adb58c510e16ca48c5940a858ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f746573742e796d6c3f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/280d6a8b0e729882b4a69c062537a84c6bdd8adb58c510e16ca48c5940a858ce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f746573742e796d6c3f6272616e63683d6d6173746572)\] () \[[![Code Coverage](https://camo.githubusercontent.com/9cb168340a6d5a1bdda8e16dafe8eed3d60f1441986fb63de17bff84ee6a18f0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f)](https://camo.githubusercontent.com/9cb168340a6d5a1bdda8e16dafe8eed3d60f1441986fb63de17bff84ee6a18f0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f)\] ()

[English](README.md) | [中文](README.zh-CN.md)

Enterprise WeChat application push module for Symfony applications.

Features
--------

[](#features)

- 🚀 Support for all Enterprise WeChat message types
- 📦 Easy integration with Symfony framework
- 🎯 Type-safe message entities with validation
- 🛡️ Built-in security features (safe mode, duplicate check)
- 📊 Rich template card message support
- 🧪 Comprehensive test coverage

Installation
------------

[](#installation)

Install the bundle using Composer:

```
composer require tourze/wechat-work-push-bundle
```

Quick Start
-----------

[](#quick-start)

1. Configure the bundle in your Symfony application
2. Create and send a text message:

```
use WechatWorkPushBundle\Entity\TextMessage;

$message = new TextMessage();
$message->setContent('Hello, Enterprise WeChat!');
$message->setAgentId(1000001);
$message->setToUser('@all');

// Send the message through your service
```

Usage
-----

[](#usage)

### Supported Message Types

[](#supported-message-types)

The bundle provides entities for all Enterprise WeChat message types:

- **Text Messages** (`TextMessage`)
- **Image Messages** (`ImageMessage`)
- **Video Messages** (`VideoMessage`)
- **File Messages** (`FileMessage`)
- **Voice Messages** (`VoiceMessage`)
- **Markdown Messages** (`MarkdownMessage`)
- **News Messages** (`NewsMessage`)
- **Text Card Messages** (`TextCardMessage`)
- **Mini Program Messages** (`MpnewsMessage`)

### Template Card Messages

[](#template-card-messages)

Advanced template card messages for interactive content:

- **Button Interaction** (`ButtonTemplateMessage`)
- **Vote Selection** (`VoteTemplateMessage`)
- **Multiple Choice** (`MultipleTemplateMessage`)
- **Text Notice** (`TextNoticeTemplateMessage`)
- **News Template** (`NewsTemplateMessage`)
- **Mini Program Notice** (`MiniProgramNoticeMessage`)

### Message Configuration

[](#message-configuration)

All message entities support common Enterprise WeChat features:

```
$message = new TextMessage();
$message->setContent('Your message content');
$message->setAgentId(1000001);        // Application ID
$message->setToUser('user1|user2');   // Target users
$message->setToParty('1|2');          // Target departments
$message->setToTag('tag1|tag2');      // Target tags
$message->setSafe(1);                 // Enable safe mode
$message->setEnableDuplicateCheck(1); // Enable duplicate check
```

Advanced Usage
--------------

[](#advanced-usage)

### Event Listeners

[](#event-listeners)

The bundle provides event listeners for message sending and revoking:

- `SendMessageListener` - Handles message sending events
- `RevokeMessageListener` - Handles message revocation events

### Custom Repositories

[](#custom-repositories)

Each message entity comes with a dedicated repository for database operations:

```
use WechatWorkPushBundle\Repository\TextMessageRepository;

$repository = $entityManager->getRepository(TextMessage::class);
$messages = $repository->findByAgent(1000001);
```

### Request Objects

[](#request-objects)

The bundle includes request objects for API interactions:

- `SendMessageRequest` - For sending messages
- `RevokeMessageRequest` - For revoking messages

Documentation
-------------

[](#documentation)

For detailed documentation on Enterprise WeChat API:

- [Message Types](https://developer.work.weixin.qq.com/document/path/96457)
- [Template Cards](https://developer.work.weixin.qq.com/document/path/90248)
- [Message Sending](https://developer.work.weixin.qq.com/document/path/96458)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance77

Regular maintenance activity

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

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

Total

3

Last Release

176d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-wechat-work-push-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-wechat-work-push-bundle/health.svg)](https://phpackages.com/packages/tourze-wechat-work-push-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

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