From 41405153a7167bbfec2638a28340b2c4954ac997 Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:06:46 +0000 Subject: [PATCH] Prepare PHP SDK 3.22.0 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 15 +++++++++++---- composer.json | 2 +- docs/laravel-adoption-contract.json | 2 +- docs/portal/build/messages.md | 12 ++++++++++-- docs/quickstart-contract.json | 6 +++--- docs/sdk-reference.md | 5 ++++- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68cf4ec1..854590f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,20 @@ project follows [Semantic Versioning](https://semver.org/). ## [Unreleased] +## [3.22.0] - 2026-11-19 + +Signal-with-start and durable signal-external need native Server 3.15.0 or +later, the first published Server that advertises `signal_with_start` and +`signal_external_workflow`. The supported Server baseline is unchanged. On an +older Server both refuse before anything is sent. + ### Added - `WorkflowContext::signalExternalWorkflow($workflowId, $signalName, $arguments, runId: null)` signals another workflow in the namespace from workflow code as a durable `signal_external_workflow` command (durable-workflow/.github#223, Server - #1134). The runtime records the signal, delivers it and records the outcome, - then gives the sender a new turn. The call returns an `ExternalSignalResult` + #1134; native Server 3.15.0 or later). The runtime records the signal, + delivers it and records the outcome, then gives the sender a new turn. The call returns an `ExternalSignalResult` whose `ExternalSignalOutcome` is `delivered`, `target_not_found`, `target_closed` or `rejected`, with the recorded `reason`, target run, target command and signal IDs. A failed outcome is a returned value, not an @@ -31,8 +38,8 @@ project follows [Semantic Versioning](https://semver.org/). - `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 (durable-workflow/.github#222, server#1133). It needs a Server that - advertises `signal_with_start` (`ClusterInfo::supportsSignalWithStart()`, native Server) - and throws `ServerCapabilityUnavailable` before sending otherwise. An open run, including + advertises `signal_with_start` (`ClusterInfo::supportsSignalWithStart()`, native Server + 3.15.0 or later) and throws `ServerCapabilityUnavailable` before sending otherwise. An open run, including the newest run after continue-as-new, is reused with its input and deadlines unchanged; the `fail` duplicate policy refuses it. A closed run is refused with `run_not_active` unless the closed run policy is `start_new_run`, which starts a fresh run after it. The diff --git a/composer.json b/composer.json index acaf6e1e..b8e75b48 100644 --- a/composer.json +++ b/composer.json @@ -97,7 +97,7 @@ } }, "durable-workflow": { - "product-train": "3.21.0", + "product-train": "3.22.0", "supported-server-versions": "2.5.0", "supported-server-release-baselines": { "2": "2.5.0", diff --git a/docs/laravel-adoption-contract.json b/docs/laravel-adoption-contract.json index 1172c5ea..f77ed529 100644 --- a/docs/laravel-adoption-contract.json +++ b/docs/laravel-adoption-contract.json @@ -32,7 +32,7 @@ }, "service_v2": { "package": "durable-workflow/sdk", - "channel": "^3.21", + "channel": "^3.22", "state_owner": "server_or_cloud" } }, diff --git a/docs/portal/build/messages.md b/docs/portal/build/messages.md index 99edb8d1..eead40af 100644 --- a/docs/portal/build/messages.md +++ b/docs/portal/build/messages.md @@ -46,6 +46,14 @@ $client->workflowHandle('order-1001')->signal('approve', ['Ada']); Signals are appropriate when the caller only needs acknowledgement that the runtime accepted the event. +To start a workflow and signal it atomically, `$client->signalWithStart($type, +$workflowId, $taskQueue, $signalName, $signalArguments, $input)` starts the +workflow or reuses its open run and records the signal in one Server +transaction, so the run cannot close between a separate start and signal. It +needs native Server 3.15.0 or later, which advertises `signal_with_start`; on +an older Server it throws `ServerCapabilityUnavailable` before sending +anything. A refusal throws `SignalWithStartFailed` with the Server's reason. + ## Signal another workflow from workflow code Workflow code signals another workflow in the same namespace with a durable @@ -89,8 +97,8 @@ replay with `NonDeterministicWorkflow` reason `external_signal_mismatch`. The call cannot run inside `all()`, `parallel()` or `select()` groups and is not a cancellation-scope member. -This needs a runtime that advertises `signal_external_workflow` (native Server -with Server #1134). PHP Server 2.x does not. Without it, the worker abandons the +This needs a runtime that advertises `signal_external_workflow`: native Server +3.15.0 or later. PHP Server 2.x does not. Without it, the worker abandons the task with `signal_external_workflow_unavailable` before it submits anything, so nothing is signalled. diff --git a/docs/quickstart-contract.json b/docs/quickstart-contract.json index 72e91c91..cbcd36be 100644 --- a/docs/quickstart-contract.json +++ b/docs/quickstart-contract.json @@ -3,9 +3,9 @@ "schema_version": 2, "package": { "name": "durable-workflow/sdk", - "published_version": "3.21.0", - "composer_requirement": "3.21.0", - "onboarding_requirement": "^3.21" + "published_version": "3.22.0", + "composer_requirement": "3.22.0", + "onboarding_requirement": "^3.22" }, "runtime_targets": { "server": { diff --git a/docs/sdk-reference.md b/docs/sdk-reference.md index 25de0d8c..27d0df5d 100644 --- a/docs/sdk-reference.md +++ b/docs/sdk-reference.md @@ -741,7 +741,10 @@ returns the recorded result without sending the signal again, and a changed target, run, name or arguments fails replay with `external_signal_mismatch`. The worker refuses the command with `signal_external_workflow_unavailable` before submitting it when the runtime does not advertise -`signal_external_workflow`. +`signal_external_workflow`; native Server 3.15.0 and later advertise it. +`Client::signalWithStart()` likewise needs native Server 3.15.0 or later, +which advertises `signal_with_start`, and throws `ServerCapabilityUnavailable` +before sending anything on an older Server. The PHP SDK does not expose update-validator authoring. Worker registration therefore declares an empty `update_validators` list for every workflow type;