承接 winglet/webhooks 相关项目开发

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

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

winglet/webhooks

Composer 安装命令:

composer require winglet/webhooks

包简介

Winglet-specific webhook extension package

README 文档

README

Winglet-specific optional webhook extension package.

This package is intentionally coupled to winglet/core. It is not a generic webhook library for other frameworks.

Scope of this version

This first package version implements outbound webhook delivery only:

  • domain event to webhook envelope mapping
  • outbox persistence with Doctrine entities
  • subscription matching
  • delivery and delivery attempt persistence
  • HMAC SHA-256 signing
  • HTTP POST delivery
  • retry scheduling
  • CLI command: webhooks:dispatch

Inbound webhook receiving is intentionally not implemented in this first extraction.

Installation

composer require winglet/webhooks

Enable the extension in application or instance config:

return [
    'app' => [
        'extensions' => [
            \Winglet\Webhooks\Bridge\WebhookExtension::class,
        ],
    ],
    'webhooks' => [
        'enabled' => true,
        'outbound' => [
            'enabled' => true,
            'service_name' => 'my-service',
        ],
    ],
];

When the extension is loaded, it registers its services, CLI command and Doctrine mapping path through Winglet\Core\Extension\WingletExtensionInterface.

Publishing events

Applications publish domain events through the core-level interface:

use Winglet\Core\Integration\Events\EventPublisherInterface;

final class ExampleService
{
    public function __construct(private EventPublisherInterface $events) {}

    public function run(): void
    {
        $this->events->publish(new ExampleDomainEvent(...));
    }
}

If winglet/webhooks is enabled, the event is written to the webhook outbox. If the package is not enabled, core provides a no-op publisher.

Dispatching deliveries

winglet webhooks:dispatch 100 100

Run this from cron or a process supervisor, usually once per minute.

Database

Use resources/migrations/001_outbound_webhooks.sql as the initial schema for the package.

Tables:

  • domain_event_outbox
  • webhook_subscription
  • webhook_delivery
  • webhook_delivery_attempt

Standard headers

Outbound webhook requests use:

  • X-Winglet-Event-Id
  • X-Winglet-Event-Type
  • X-Winglet-Timestamp
  • X-Winglet-Source-Service
  • X-Winglet-Signature

Signature format:

sha256=<hex-hmac>

Signing input:

timestamp + "\n" + rawBody

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-07-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固