temporalio / sdk-php

Temporal PHP SDK
https://php.preview.thundergun.io
MIT License
270 stars 45 forks source link

[Feature Request] Make startUpdate users aware that it's synchronous w/ worker #426

Closed drewhoskins-temporal closed 4 months ago

drewhoskins-temporal commented 5 months ago

Is your feature request related to a problem? Please describe.

See https://github.com/temporalio/features/issues/469

https://github.com/temporalio/sdk-php/blob/8cdcc1819be60e838d5e1f92b69f913aac61a58e/src/Client/WorkflowStubInterface.php#L106

wait stage is currently optional and the docstring implies it's async rather than sync

Describe the solution you'd like

Additional context

roxblnfk commented 4 months ago

With the release of 2.9.0, the method description was adjusted in such a way that the user would not be misled about the asynchronous operation of the method (https://github.com/temporalio/sdk-php/pull/429).

We decided to force customers to explicitly pass in a flag saying what’s being awaited. (e.g. start_update(wait_for_stage=ACCEPTED/COMPLETED)) and then if they don’t provide it.

However, changing the method signature will lead to a breaking change. We can add a method like startUpdateAsync in the future when WaitPolicy support it.