Skip to content

PHP SDK 3.22.0

Choose a tag to compare

@rmcdaniel rmcdaniel released this 19 Nov 18:16
· 42 commits to main since this release
c056d69

PHP SDK 3.22.0 adds atomic signal-with-start and durable signals from workflow code to other workflows. Both need native Server 3.15.0 or later.

  • Signal-with-start (durable-workflow/.github#222, #439):
    • Client::signalWithStart() starts a workflow or reuses its open run and records one signal on it in a single Server transaction, so the run cannot close between a separate start and signal.
    • An open run is reused with its input and deadlines unchanged. A closed run is refused with run_not_active unless the closed run policy is start_new_run. The request ID is the signal's command key, so a retry returns the original receipt, even after the run closed.
    • Every refusal throws SignalWithStartFailed with the Server's reason, and nothing was written. A Server that does not advertise signal_with_start gets ServerCapabilityUnavailable before anything is sent.
  • Durable signal-external (durable-workflow/.github#223, #438):
    • WorkflowContext::signalExternalWorkflow($workflowId, $signalName, $arguments, runId: null) and ChildWorkflowHandle::signal() signal another workflow from workflow code as a durable signal_external_workflow command. The call returns an ExternalSignalResult: delivered, target_not_found, target_closed or rejected, with the recorded reason. A failed outcome is a returned value, not an exception.
    • Replay returns the recorded result without sending the signal again. A changed target, run, signal name or arguments fails replay with external_signal_mismatch.
    • A signal name the Server would refuse throws InvalidSignalName in workflow code before any command is sent. Without the signal_external_workflow capability, the worker abandons the task with signal_external_workflow_unavailable before submitting anything.

Native Server 3.15.0 is the first published Server that advertises both capabilities. Both features were qualified against durableworkflow/server:3.15.0@sha256:f7f84884ff178e36b6536237f9f31eb006ed050feac3028106af736bc01d19de. Worker protocol, the supported Server baseline, the Laravel bridge floors and PHP ^8.1 are unchanged. The onboarding series and Laravel adoption channel move to ^3.22.

See #439, #438 and #442.