Repository navigation
Split callback watching into focused units - #22
Merged
Merged
Conversation
CallbackWatchRunner ran both watch modes and owned polling, delivery and payment parsing. It now only picks the mode: - SinglePaymentWatch: one payment by payment ID or order ID - AccountWideWatch: every payment from the readiness second - WatchPoller: shared retrying poll (non-retryable errors still stop) - OperationForwarder: shared signing and FIFO delivery with retries - WatchedPayment: payment ID and operation parsing - CallbackWatchRequest: replaces run()'s eight parameters - CallbackWatchObserver: one typed method per progress event, replacing string event names and loose context arrays - CallbackWatchProgress: renders those events for callbacks:watch Messages, retry rules, exit behaviour and the sleep/continue/clock hooks are unchanged; tests change only where they called the old signatures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits
CallbackWatchRunner, which ran both single-payment and account-wide watching in one 373-line class, into focused units. Behaviour and output are unchanged.Changed
SinglePaymentWatchandAccountWideWatcheach run one watch mode;WatchPoller,OperationForwarderandWatchedPaymenthold the polling, delivery and payment logic both modes share.CallbackWatchRunneronly picks the mode.CallbackWatcher::run()takes aCallbackWatchRequestvalue object instead of eight parameters.CallbackWatchObserverinstead of strings with loose arrays.CallbackWatchProgressrenders them forcallbacks:watch, so an event can no longer be misspelled or missed.Testing
composer checkpasses: the Pest suite, PHPStan and Pint.🤖 Generated with Claude Code