CIVIPLMMI-247: Rename WebhookQueueRunner API to PaymentWebhookRunner#10
CIVIPLMMI-247: Rename WebhookQueueRunner API to PaymentWebhookRunner#10
Conversation
Rename the API entity to avoid naming conflicts with GoCardless extension's own WebhookQueueRunner API.
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
Overview
Rename the
WebhookQueueRunnerAPI entity toPaymentWebhookRunnerto avoid naming conflicts with the GoCardless extension, which has its ownWebhookQueueRunnerAPI.Before
WebhookQueueRunner.RunAfter
PaymentWebhookRunner.RunWebhookQueueRunnerAPITechnical Details
Files Changed
api/v3/PaymentWebhookRunner/Run.php(renamed fromapi/v3/WebhookQueueRunner/Run.php)civicrm_api3_webhook_queue_runner_Run→civicrm_api3_payment_webhook_runner_Run_civicrm_api3_webhook_queue_runner_Run_spec→_civicrm_api3_payment_webhook_runner_Run_speccivicrm_api3_create_success()callmanaged/Job_PaymentWebhookRunner.mgd.php(renamed frommanaged/Job_WebhookQueueRunner.mgd.php)name:Job:WebhookQueueRunner→Job:PaymentWebhookRunnerapi_entity:WebhookQueueRunner→PaymentWebhookRunnerNote
The internal
WebhookQueueRunnerServicePHP class was NOT renamed - it's an internal implementation detail, not the public CiviCRM API entity.Core overrides
None
Comments