定制 tourze/symfony-async-message-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tourze/symfony-async-message-bundle

最新稳定版本:0.0.3

Composer 安装命令:

composer require tourze/symfony-async-message-bundle

包简介

Symfony异步消息模块

README 文档

README

English | 中文

English

A Symfony bundle that provides asynchronous command execution capabilities using Symfony Messenger.

Features

  • Asynchronous command execution
  • Built-in error handling and logging
  • Support for command options and arguments
  • Integration with Symfony Messenger

Requirements

  • PHP 8.1 or higher
  • Symfony 6.4 or higher
  • Symfony Messenger component

Installation

composer require tourze/symfony-async-message-bundle

Configuration

Enable the bundle in your config/bundles.php:

return [
    // ...
    Tourze\Symfony\AsyncMessage\AsyncMessageBundle::class => ['all' => true],
];

Usage

  1. Create a message:
use Tourze\Symfony\AsyncMessage\Message\RunCommandMessage;

$message = new RunCommandMessage();
$message->setCommand('your:command');
$message->setOptions([
    '--option1' => 'value1',
    '--option2' => 'value2'
]);
  1. Dispatch the message:
$this->messageBus->dispatch($message, [
    new AsyncStamp()
]);

License

This bundle is licensed under the MIT License.

中文

一个使用 Symfony Messenger 提供异步命令执行功能的 Symfony Bundle。

特性

  • 异步命令执行
  • 内置错误处理和日志记录
  • 支持命令选项和参数
  • 与 Symfony Messenger 集成

要求

  • PHP 8.1 或更高版本
  • Symfony 6.4 或更高版本
  • Symfony Messenger 组件

安装

composer require tourze/symfony-async-message-bundle

配置

config/bundles.php 中启用 bundle:

return [
    // ...
    Tourze\Symfony\AsyncMessage\AsyncMessageBundle::class => ['all' => true],
];

使用方法

  1. 创建消息:
use Tourze\Symfony\AsyncMessage\Message\RunCommandMessage;

$message = new RunCommandMessage();
$message->setCommand('your:command');
$message->setOptions([
    '--option1' => 'value1',
    '--option2' => 'value2'
]);
  1. 发送消息:
$this->messageBus->dispatch($message, [
    new AsyncStamp()
]);

许可证

本 Bundle 基于 MIT 许可证。

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-24