-
Notifications
You must be signed in to change notification settings - Fork 50
fix: incorrect updateWithStart signature #594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: incorrect updateWithStart signature #594
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't notice that my review was in pending status.
@@ -80,7 +80,7 @@ public function signalWithStart(SignalWithStartInput $input, callable $next): Wo | |||
* | |||
* @see WorkflowClientCallsInterceptor::updateWithStart() | |||
*/ | |||
public function updateWithStart(UpdateWithStartInput $input, callable $next): UpdateHandle | |||
public function updateWithStart(UpdateWithStartInput $input, callable $next): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you replace the array with UpdateWithStartOutput DTO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, hopefully managed to cover all the relevant places for it.
Also that exception returning makes things messy, considered making separate properties for $handle
and $exception
, but then we would have nullable values and ugly checks for those
What was changed
WorkflowClientCallsInterceptor::updateWithStart()
signature to match value returned fromWorkflowStarter::updateWithStart()
Why?
Because whenever
WorkflowClientCallsInterceptor
implementation is provided andupdateWithStart()
is called exception happens.Example output, from the provided test case, if signature change is reverted
Checklist
Closes nothing (did not find any related issue)
How was this tested:
See the added test case
Any docs updates needed?
No