Repository navigation
PHP SDK 3.13.0
PHP SDK 3.13.0 adds worker recovery from stale registration and a schedule-origin accessor. It also fixes two cases where the SDK hid a problem from callers.
Changed
Worker::run()now recovers fromstale_worker_registrationinstead of stopping (#378, #357). A host pause, long GC stop or network partition can outlast the Server's registration-freshness window. When that happens, the worker drops every task the fenced incarnation held without completing it, registers again and keeps polling, and the Server redelivers the dropped work. Repeated recoveries back off up to 60 seconds. Each one logsworker.reregisteredand incrementsdurable_workflow_worker_reregistrations. PassstopOnStaleRegistration: trueto keep the old stop behavior.
Added
WorkflowContext::scheduleOrigin()returns the schedule id, occurrence time and trigger number of the schedule fire that started a run, ornullfor an ordinary start (#382). Use it to pick a time window, including for backfills. The value is identical on replay.
Fixed
- Upgrade note: when a
waitFor: 'completed'update wait ends before the update finishes,Client::updateWorkflow()andWorkflowHandle::update()now throwUpdateStillPending(#383). Before, they returned the Server receipt as if it were the update's result. The exception carriesupdateId,requestId,workflowId,runIdandupdateStatus. Call the update again with$pending->requestIdto keep waiting; that doesn't apply the update twice.waitFor: 'accepted'andupdateWorkflowReceipt()are unchanged. - A local activity with more retries than
backoff_secondsentries now repeats the last delay instead of retrying immediately, matching server-scheduled activities (#379).
No protocol or Server requirement changes. Tested against native Server 3.4.0.