tourze/wechat-work-mini-program-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tourze/wechat-work-mini-program-bundle

最新稳定版本:0.0.1

Composer 安装命令:

composer require tourze/wechat-work-mini-program-bundle

包简介

A Symfony Bundle for WeChat Work Mini Program integration

README 文档

README

English | 中文

Latest Version PHP Version Require License Total Downloads Code Coverage

A Symfony Bundle for WeChat Work Mini Program integration. This bundle provides tools and event system for managing WeChat Work Mini Program authentication and user interactions.

Requirements

  • PHP 8.1 or higher
  • Symfony 7.3 or higher

Installation

composer require tourze/wechat-work-mini-program-bundle

Quick Start

1. Register Bundle

Add the bundle to config/bundles.php:

return [
    // ...
    WechatWorkMiniProgramBundle\WechatWorkMiniProgramBundle::class => ['all' => true],
];

2. Basic Usage

<?php

use WechatWorkMiniProgramBundle\Event\CodeToSessionEvent;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

// Dispatch code to session event
$event = new CodeToSessionEvent();
$dispatcher->dispatch($event);

Features

  • Code2Session Integration: Handle WeChat Work Mini Program authentication flow
  • Event System: Built-in event dispatcher for handling authentication events
  • Console Commands: Testing and debugging commands
  • Symfony Integration: Seamless integration with Symfony applications
  • PHP 8.1+ Support: Modern PHP features and strict typing
  • Test Coverage: Comprehensive test suite with PHPUnit

API Reference

Events

CodeToSessionEvent

use WechatWorkMiniProgramBundle\Event\CodeToSessionEvent;

// Basic event for handling WeChat Work Mini Program authentication
$event = new CodeToSessionEvent();

Note: This event class is currently minimal and may be extended in future versions with methods for handling authentication parameters and response data.

Commands

Test Command

php bin/console wechat-work:test

This command is used for testing the bundle functionality and verifying proper installation.

Development

Running Tests

# Run all tests
./vendor/bin/phpunit packages/wechat-work-mini-program-bundle/tests

# Run with coverage
./vendor/bin/phpunit packages/wechat-work-mini-program-bundle/tests --coverage-text

Code Quality

# PHPStan analysis
php -d memory_limit=2G ./vendor/bin/phpstan analyse packages/wechat-work-mini-program-bundle

Contributing

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

License

The MIT License (MIT). Please see License File for more information.

References

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-10