Upgrading Webhooks#
Back up the database and exported configuration before upgrading. Test the new
branch with representative subscriptions and ECA models on a staging site first.
Install compatible Drupal and ECA versions, run drush updatedb, rebuild caches,
and review configuration exports before deployment.
Existing subscriptions#
Subscription IDs, destinations, selected event identifiers, content types, custom signature headers, algorithms, tokens, active states, and blocking mode are preserved by the configuration migrations. Retest both incoming and outgoing subscriptions after updates and after importing configuration.
Signing secrets#
3.0.x retains its existing stored secret configuration. On 4.0.x, update 10002 removes stored HMAC secrets and configuration exports omit them. Before applying that update, provision a settings.php configuration override for every signed subscription, using its actual machine name:
1 | |
Ensure the environment variable is available to the web and cron runtimes before updating. The update does not transfer keys into settings.php or environment variables. Keep these keys out of exported configuration and version control. Without an effective override, the removed stored key no longer configures HMAC verification/signing. Review token-based authentication separately: the token field is still stored in configuration on both branches.
Event selections#
3.0.x keeps its serialized event-selection format. On 4.0.x, the
webhooks_post_update_normalize_event_selections post-update converts legacy
serialized selections to YAML string sequences. It preserves complete event
identifiers, removes unchecked entries and duplicates, and leaves an already
normalized sequence unchanged. Run database updates before exporting or deploying
4.0.x configuration and review the resulting YAML.
Existing incoming ECA models#
Existing webhook_receive models retain their subscription selector and action
graph. Scalar tokens such as event:webhook:id and
event:webhook:content_type remain available. The payload contract differs:
| Token | 3.0.x | 4.0.x |
|---|---|---|
event:webhook:payload |
Posted request body string | Decoded payload data |
event:webhook:payload:order_id |
Use an action to decode the body first | Decoded order_id value |
event:webhook:raw_body |
Exact posted body | Exact posted body |
Before moving a 3.0.x model to 4.0.x, use event:webhook:raw_body wherever an
action expects the original bytes, or map the appropriate decoded payload fields.
Save and reload a representative model, send a sample request with valid
configured authentication, and verify that its actions execute. Include a sample
with whitespace in its body when exact bytes matter.
The old verify_payload boolean remains readable but cannot override the
receiver's configured authentication checks. See the ECA guide for
subscription filtering and wildcard selection.
Metadata headers#
See the header migration guide for canonical names, legacy fallbacks, precedence, and delivery identifiers. 3.0.x sends legacy aliases alongside its supported neutral headers; 4.0.x emits neutral metadata headers. Update receiver parsing and deduplication before switching production senders. Signature headers are independent of these metadata names.
Optional delivery features#
Durable asynchronous delivery is opt-in; synchronous delivery remains the default. Run database updates before enabling it, arrange regular cron, and monitor failed deliveries. Accepted asynchronous dispatch means persisted for delivery, not confirmed delivery to the remote system. Receivers must tolerate repeated delivery IDs. Review durable outgoing delivery before enabling it, and retain synchronous processing until these operational requirements are met.