Download the PHP package as-cornell/as_webhook_update without Composer
On this page you can find all versions of the php package as-cornell/as_webhook_update. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download as-cornell/as_webhook_update
More information about as-cornell/as_webhook_update
Files in as-cornell/as_webhook_update
Package as_webhook_update
Short Description Provides a webhook notification service tied into hook_post_action, used to generate remote nodes and terms.
License GPL-3.0-or-later
Homepage https://communications.as.cornell.edu
Informations about the package as_webhook_update
AS WEBHOOK UPDATE (as_webhook_update)
INTRODUCTION

Provides a webhook notification service that sends entity changes (articles, people, taxonomy terms) to remote systems via HTTP webhooks. Uses an OOP architecture with services, extractors, and dependency injection for maintainability and testability.
REQUIREMENTS
Required Modules
drupal/hook_post_action- Provides post-action hooks for entity operationsdrupal/key- Provides secure storage for the authorization token
System Requirements
- Drupal 9.5+ or Drupal 10+
- PHP 8.0+
INSTALLATION
New Installation
-
Install dependencies:
-
Enable the modules:
-
Configure the authorization token:
- Navigate to
/admin/config/services/webhook-update - Enter your authorization token
- Click "Save Configuration"
The token is securely stored using the Key module and will not be exported with configuration.
- Navigate to
- Verify the configuration:
Upgrading from Previous Version
IMPORTANT: If you're upgrading from the procedural version to the OOP version, you must manually import the domain configuration. You will need to set up the relationship between domains as fits your use case:
-
Clear cache:
-
Import domain configuration:
Or if using Lando:
Or if on Pantheon (adapt pattern as appropriate):
-
Verify the config was imported:
You should see environment-specific webhook URLs.
-
Migrate the authorization token (if you had one configured):
- Test the webhooks:
- Update an article, person, or taxonomy term
- Check logs:
drush watchdog:show --type=as_webhook_update
CONFIGURATION
Authorization Token
The webhook authorization token is stored securely via the Key module and is NOT exported with configuration:
- Configure via UI:
/admin/config/services/webhook-update - Configure via Drush: See installation instructions above
- Documentation: See
KEY_SETUP.mdfor detailed setup instructions
Webhook Destinations
Webhook URLs are configured in config/install/as_webhook_update.domain_config.yml and are environment-specific:
- Local (Lando):
artsci-*.lndo.site - Dev/Test (Pantheon):
*-artsci-*.pantheonsite.io - Production:
*.as.cornell.edu
The module automatically determines the correct webhook URLs based on the current domain.
ARCHITECTURE
OOP Design (v2.0+)
The module uses a service-based architecture with dependency injection:
Hooks
The module implements Drupal hooks that delegate to the dispatcher service:
hook_ENTITY_TYPE_postinsert()- For nodes and taxonomy termshook_ENTITY_TYPE_postupdate()- For nodes and taxonomy termshook_ENTITY_TYPE_postdelete()- For nodes
Supported Entities
- Article nodes - Sent to articles webhook
- Person nodes - Sent to AS, department, and/or media report webhooks based on person type
- Taxonomy terms -
academic_interests,academic_role,research_areas
MAINTAINERS
Current maintainers for Drupal 10:
- Mark Wilson (markewilson)
DOCUMENTATION
- REFACTORING.md - Details about the OOP refactoring
- KEY_SETUP.md - Complete guide to setting up the authorization token
- as_webhook_update.services.yml - Service definitions
TROUBLESHOOTING
No webhooks being sent
-
Check if domain config is imported:
If it returns "Config does not exist", import it:
-
Check if authorization token is configured:
-
Check the logs:
- Verify the dispatcher service exists:
HTTP code 0 errors
If webhooks show "HTTP code 0", the destination server is unreachable:
- Verify the destination server is running
- Check network connectivity
- Verify the webhook listener endpoint exists