Skip to content

CIVIPLMMI-247: Rename WebhookQueueRunner API to PaymentWebhookRunner#10

Merged
erawat merged 1 commit intomasterfrom
CIVIPLMMI-247-rename-webhook-api
Jan 22, 2026
Merged

CIVIPLMMI-247: Rename WebhookQueueRunner API to PaymentWebhookRunner#10
erawat merged 1 commit intomasterfrom
CIVIPLMMI-247-rename-webhook-api

Conversation

@erawat
Copy link
Member

@erawat erawat commented Jan 22, 2026

Overview

Rename the WebhookQueueRunner API entity to PaymentWebhookRunner to avoid naming conflicts with the GoCardless extension, which has its own WebhookQueueRunner API.

Before

  • API entity: WebhookQueueRunner.Run
  • GoCardless webhooks fail to run because CiviCRM picks up this extension's generic API name instead of GoCardless's own implementation

After

  • API entity: PaymentWebhookRunner.Run
  • Both extensions can coexist without API naming conflicts
  • GoCardless webhooks run correctly using their own WebhookQueueRunner API

Technical Details

Files Changed

  1. api/v3/PaymentWebhookRunner/Run.php (renamed from api/v3/WebhookQueueRunner/Run.php)

    • Function renamed: civicrm_api3_webhook_queue_runner_Runcivicrm_api3_payment_webhook_runner_Run
    • Spec function renamed: _civicrm_api3_webhook_queue_runner_Run_spec_civicrm_api3_payment_webhook_runner_Run_spec
    • Updated entity name in civicrm_api3_create_success() call
  2. managed/Job_PaymentWebhookRunner.mgd.php (renamed from managed/Job_WebhookQueueRunner.mgd.php)

    • Updated name: Job:WebhookQueueRunnerJob:PaymentWebhookRunner
    • Updated api_entity: WebhookQueueRunnerPaymentWebhookRunner

Note

The internal WebhookQueueRunnerService PHP class was NOT renamed - it's an internal implementation detail, not the public CiviCRM API entity.

Core overrides

None

Comments

  • Existing sites will need to clear CiviCRM cache after upgrade for the scheduled job to use the new API entity
  • The scheduled job "Process Payment Webhooks" will automatically use the new API after cache clear

Rename the API entity to avoid naming conflicts with GoCardless
extension's own WebhookQueueRunner API.
@gemini-code-assist
Copy link

Summary of Changes

Hello @erawat, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical naming conflict by renaming the WebhookQueueRunner API to PaymentWebhookRunner. This change is essential for allowing multiple extensions, particularly GoCardless, to coexist and process their respective webhooks without API collisions, thereby ensuring the stability and correct operation of payment webhook processing across the system.

Highlights

  • API Renaming: The WebhookQueueRunner API entity has been renamed to PaymentWebhookRunner.
  • Conflict Resolution: This change resolves naming conflicts with the GoCardless extension, which has its own WebhookQueueRunner API.
  • Improved Coexistence: Both core payment webhook processing and GoCardless webhooks can now coexist and function correctly without interference.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the WebhookQueueRunner API to PaymentWebhookRunner to resolve a naming conflict with the GoCardless extension. The changes are consistent and correctly applied across the API definition, the spec function, and the associated scheduled job. The file renames and updates to function names, comments, and entity references are all correct. I have one suggestion regarding the internal service class name for better long-term maintainability, but overall this is a solid change that addresses the issue described.

* @throws \CRM_Core_Exception
*/
function civicrm_api3_webhook_queue_runner_Run(array $params): array {
function civicrm_api3_payment_webhook_runner_Run(array $params): array {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and long-term maintainability, consider renaming the internal WebhookQueueRunnerService to PaymentWebhookQueueRunnerService and its service definition from paymentprocessingcore.webhook_queue_runner to paymentprocessingcore.payment_webhook_queue_runner. While I understand from the PR description that this was an intentional choice to limit the scope, aligning the internal service name with the public API name (PaymentWebhookRunner) would prevent potential confusion for future developers maintaining this code.

@erawat erawat merged commit 5c84829 into master Jan 22, 2026
3 checks passed
@erawat erawat deleted the CIVIPLMMI-247-rename-webhook-api branch January 22, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants