Repository navigation
Temporal PHP SDK v2.19
A small release: a client for the Temporal Cloud Operations API, an opt-in change to multi-condition await, and a set of correctness, including compatibility fixes for ext-protobuf 3.x and performance improvements.
Features
Cloud Operations API Client
A CloudClient / CloudClientInterface pair exposes the Cloud Operations API
through the SDK's own gRPC abstraction, so it shares connection handling, metadata, interceptors,
retries and call context with WorkflowClient and OperatorClient.
withApiVersion() pins the required temporal-cloud-api-version header on every call; a version
already present on the call context wins.
use Temporal\Api\Cloud\Cloudservice\V1\GetNamespacesRequest;
use Temporal\Client\GRPC\CloudClient;
$cloud = CloudClient::createSSL('saas-api.tmprl.cloud:443')
->withAuthKey($apiKey)
->withApiVersion('2024-05-13-00');
$response = $cloud->GetNamespaces(new GetNamespacesRequest());The stubs come from the CloudService gRPC definitions shipped in roadrunner-api-dto 1.15.0,
so the package constraint moves to ^1.15.0.
Closes #476.
Settle await() on the First Settled Condition
A rejected promise passed to a multi-condition Workflow::await() / awaitWithTimeout() used to be
swallowed until the timeout fired. With the new flag the await unblocks on the first settled
condition and propagates the rejection (Promise::any → Promise::race); the pending internal
timer of awaitWithTimeout() is cancelled on that path too.
Because this changes the commands a workflow emits, it is gated behind a feature flag — default off
keeps existing histories replay-compatible, mirroring sdk-java's CANCEL_AWAIT_TIMER_ON_CONDITION.
\Temporal\Worker\FeatureFlags::$settleAwaitOnFirstSettledCondition = true;
// $activityPromise rejects -> the await rejects immediately instead of waiting for the timeout
yield Workflow::awaitWithTimeout('10 minutes', $activityPromise, fn(): bool => $this->done);To wait for the first fulfilled condition and keep ignoring rejections, combine the promises
explicitly: yield Workflow::await(Promise::any([$a, $b])).
Closes #399.
Others improvements and fixes
- #804 – fix: unwrap protobuf repeated fields from the C extension (@xepozz)
- #806 – perf(loop): drain the once-callback queue of a loop layer in linear instead of quadratic time (@xepozz)
- #807 – fix(testing): a readiness check that answers slower than its one second timeout no longer aborts the run (@xepozz)
- #809 - test(unit): name the eleven orphaned unit test files TestCase so the Unit suite picks them up (@xepozz)