Skip to content

Fix unsubscribe command argument mismatch#4608

Open
Misrilal-Sah wants to merge 1 commit intocachethq:developfrom
Misrilal-Sah:pr/fix-unsubscribe-command-args
Open

Fix unsubscribe command argument mismatch#4608
Misrilal-Sah wants to merge 1 commit intocachethq:developfrom
Misrilal-Sah:pr/fix-unsubscribe-command-args

Conversation

@Misrilal-Sah
Copy link
Copy Markdown

Issue link id: N/A (proactive bugfix found during unsubscribe-path audit)

Description:
Fixes incorrect command dispatch that passed extra arguments to UnsubscribeSubscriberCommand.
The command constructor accepts only the subscriber, so this mismatch can cause runtime issues on stricter PHP versions.
Updated dispatch call to match command signature exactly.

Copilot AI review requested due to automatic review settings March 31, 2026 18:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an incorrect command dispatch in the unsubscribe flow by aligning the UnsubscribeSubscriberCommand instantiation with its constructor signature (subscriber-only), preventing runtime ArgumentCountError issues on stricter PHP versions.

Changes:

  • Update SubscribeController@getUnsubscribe to dispatch UnsubscribeSubscriberCommand with only the Subscriber argument.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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