Delegate webhook pipeline to fluent WebhookProcessor#8
Merged
sandervanhooft merged 7 commits intomainfrom Mar 13, 2026
Merged
Conversation
Replace the Laravel-specific webhook handling (middleware, event listeners, cascading) with the fluent package's WebhookProcessor. This removes significant duplication between the packages. Key changes: - Register WebhookProcessor in service provider with all three reactions - Simplify controller to delegate to WebhookProcessor - Remove VerifyVatlyWebhookSignature middleware (processor verifies internally) - Remove all event listeners (replaced by fluent reactions) - Remove empty event/exception wrappers (use fluent's directly) - Remove BillableInterface wrapper (use Vatly\Fluent\Contracts\BillableInterface) - Add customer_id → owner morph resolution in repositories - Clean up Subscription model (remove webhook handler methods) BREAKING: Events are now dispatched from Vatly\Fluent\Events namespace.
Remove VCS repository override and dev branch constraint now that the fluent-php osaka branch has been merged and released as v0.3.0-alpha.2 on Packagist.
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.
Summary
WebhookProcessorWhat changed
Controller: Now injects
WebhookProcessoronly, delegateshandle(payload, signature), catches signature errors → 403.Service provider: Registers
WebhookProcessorsingleton with all three reactions (SyncSubscriptionOnStarted,CancelSubscriptionOnCanceled,StoreOrderOnPaid). RemovesbootEventListeners().Repositories:
EloquentSubscriptionRepositoryandEloquentOrderRepositorynow resolvecustomer_id→owner_type/owner_idmorph columns increate(), so fluent reactions work seamlessly with Eloquent.Removed: All listeners, event wrappers,
VerifyVatlyWebhookSignaturemiddleware,BillableInterfacewrapper, dead exception classes,Subscription::handleImmediateCancellation/handleGracePeriodCancellation.Breaking changes
Vatly\Fluent\Events\*(notVatly\Laravel\Events\*)Subscription::handleImmediateCancellation()/handleGracePeriodCancellation()Vatly\Laravel\Contracts\BillableInterface(useVatly\Fluent\Contracts\BillableInterface)Test plan