Download the PHP package tourze/wechat-work-app-chat-bundle without Composer
On this page you can find all versions of the php package tourze/wechat-work-app-chat-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package wechat-work-app-chat-bundle
Wechat Work App Chat Bundle
中文
Enterprise WeChat group chat management bundle for Symfony applications.
Features
- Create and manage Enterprise WeChat group chats
- Send text, markdown, image, and file messages to group chats
- Automatic message queue with retry mechanism
- Symfony command-line tools for batch operations
- Event-driven message sending
Requirements
- PHP 8.1+
- Symfony 6.4+
- Enterprise WeChat Work API credentials
Installation
Configuration
Register the bundle in your application:
Usage
Services
AppChatService
Manages Enterprise WeChat group chats:
MessageService
Handles message sending to group chats:
Entities
- AppChat: Represents an Enterprise WeChat group chat
- TextMessage: Plain text messages with @mention support
- MarkdownMessage: Markdown formatted messages
- ImageMessage: Image messages with media ID
- FileMessage: File messages with media ID
Commands
Send Unsent Messages
Sends all queued messages that haven't been sent yet:
This command:
- Retrieves all unsent messages from the database
- Attempts to send each message via WeChat Work API
- Updates message status upon successful sending
- Handles errors gracefully with detailed output
Sync Group Chats
Synchronizes group chat information with WeChat Work API:
This command:
- Fetches all unsynced group chats
- Retrieves latest information from WeChat Work API
- Updates local database with current group chat details
- Reports sync status and any errors
Event Subscribers
The bundle includes an automatic message sending subscriber that triggers when new messages are persisted to the database. This ensures messages are sent immediately when created.
Examples
Creating and Sending Messages
Managing Group Chats
Testing
Run the test suite:
Contributing
Please read the main repository's contributing guidelines before submitting pull requests.
License
This bundle is licensed under the same license as the parent monorepo.
All versions of wechat-work-app-chat-bundle with dependencies
doctrine/collections Version ^2.3
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^3.1 || ^4
psr/log Version ^3|^2|^1
symfony/config Version ^6.4
symfony/console Version ^6.4
symfony/dependency-injection Version ^6.4
symfony/doctrine-bridge Version ^6.4
symfony/framework-bundle Version ^6.4
symfony/http-kernel Version ^6.4
symfony/yaml Version ^6.4 || ^7.1
tourze/doctrine-indexed-bundle Version 0.0.*
tourze/doctrine-snowflake-bundle Version 0.1.*
tourze/doctrine-timestamp-bundle Version 0.0.*
tourze/doctrine-user-bundle Version 0.0.*
tourze/easy-admin-attribute Version 0.1.*
tourze/http-client-bundle Version 0.1.*
tourze/wechat-work-bundle Version 0.1.*
tourze/wechat-work-contracts Version 0.0.*