Download the PHP package rasuvaeff/yii3-outbox-webhooks-bridge without Composer
On this page you can find all versions of the php package rasuvaeff/yii3-outbox-webhooks-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii3-outbox-webhooks-bridge
rasuvaeff/yii3-outbox-webhooks-bridge
Bridges yii3-outbox and yii3-webhooks for durable at-least-once webhook delivery. Each outbox message is converted to a WebhookEvent and dispatched to configured endpoints via an injected WebhookDispatcher.
Using an AI coding assistant? llms.txt has a compact API reference designed for LLMs.
Requirements
- PHP 8.3–8.5
rasuvaeff/yii3-outbox^1.0rasuvaeff/yii3-webhooks^1.0- A
WebhookDispatcherimplementation (e.g. a PSR-18-based adapter in your app) - A
WebhookDeliveryStorageimplementation (e.g.yii3-webhooks-db)
Installation
Usage
1. Configure endpoints
2. Wire the publisher
3. Run the outbox processor
Behaviour
| Situation | Result |
|---|---|
Endpoint returns Delivered |
Delivery saved; message marked published |
Endpoint returns Failed |
Delivery saved; PublishException thrown → outbox retries |
| Dispatcher throws | PublishException thrown → outbox retries |
| No endpoints for type | Silent success (zero deliveries, message published) |
| Multiple endpoints, one fails | All dispatched; PublishException thrown → all retried |
Event id dedup
The outbox message id is reused as the WebhookEvent id. On retry, the same id
is sent again. Receivers should use the X-Webhook-Id header (set by
HmacSha256Signer) for idempotency.
Custom endpoint provider
Implement WebhookEndpointProvider to load endpoints from a database, cache, or
any runtime source:
Security
- Secrets are never stored in
WebhookDelivery(comes fromyii3-webhooks). - Use
HmacSha256Signer(fromyii3-webhooks) as yourWebhookDispatcher's signer to authenticate outbound requests. - Receivers should validate the signature via
WebhookVerifierand useReplayGuardagainst nonce replay.
Examples
See examples/ for runnable scripts.
Development
License
BSD-3-Clause. See LICENSE.md.
All versions of yii3-outbox-webhooks-bridge with dependencies
rasuvaeff/yii3-outbox Version ^1.0
rasuvaeff/yii3-webhooks Version ^1.0