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_outboxwebhook_subscriptionwebhook_deliverywebhook_delivery_attempt
Standard headers
Outbound webhook requests use:
X-Winglet-Event-IdX-Winglet-Event-TypeX-Winglet-TimestampX-Winglet-Source-ServiceX-Winglet-Signature
Signature format:
sha256=<hex-hmac>
Signing input:
timestamp + "\n" + rawBody
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-07-11