v2.17.0
Temporal PHP SDK v2.17.0
This release focuses on better observability, improved error handling, clearer APIs, and significantly enhanced testing & CI reliability.
Several deprecations were introduced to improve long-term API consistency.
Features
Expose FirstRunId & OriginalRunId in WorkflowInfo
WorkflowInfo now exposes:
getFirstRunId()getOriginalRunId()
This improves traceability across retries, resets and continue-as-new chains.
$info = Workflow::getInfo();
$firstRun = $info->getFirstRunId();
$originalRun = $info->getOriginalRunId();This is particularly useful for observability tooling and debugging long-running workflow chains.
Workflow Current Details Support
Workflows can now expose structured “current details” metadata, improving runtime inspection and debugging of workflow state.
Expose Retry Policy in Activity Context
Activities can now access their configured retry policy:
$context = Activity::getContext();
$retryPolicy = $context->getRetryOptions();This enables dynamic behavior depending on retry configuration.
ApplicationFailure ErrorCategory Exposure
ApplicationFailure now exposes ErrorCategory, allowing more precise error classification and handling logic in workflows.
RawValue Implementation
Introduced RawValue for pass-through or untyped payload handling.
Useful when custom serialization control is required.
Environment Configuration Exposure
Improved environment configuration visibility and integration, especially useful for CI and containerized deployments.
Windows Test Runner Wrapper
Added a wrapper to properly handle non-zero exit codes on Windows systems.
Improves cross-platform development and CI reliability.
Deprecations
Activity Method Without #[ActivityMethod] Attribute
Using an activity method without the required #[\Temporal\Activity\ActivityMethod] attribute now triggers a deprecation warning.
#[\Temporal\Activity\ActivityMethod]
public function sendEmail(): void
{
// ...
}This ensures explicit activity registration and prevents subtle misconfiguration.
Tip
You may disable this behavior with the feature flag \Temporal\Worker\FeatureFlags::$warnOnActivityMethodWithoutAttribute
See https://github.com/temporalio/sdk-php/blob/962c897757d9e9c29d579edb12c94e01b1c6fd52/src/Worker/FeatureFlags.php#L66C25-L66C61
Improvements
Friendly Outbound Context Exception
Improved error messages when workflow/activity context is misused outside its valid execution scope.
Exceptions are now more descriptive and actionable.
Improved DX for WorkflowRunInterface::getResult($type)
Improved typed result retrieval and clearer error feedback when incorrect types are requested.
DateInterval Ambiguity Warning
Improved handling and warnings for ambiguous DateInterval usage to avoid subtle time calculation inconsistencies.
Improved Priority Validation
Enhanced validation in Priority::withFairnessWeight() with stricter guarantees and additional test coverage.
More Lenient Search Attribute Parsing
Search attribute parsing is now more tolerant to slightly variant input types, improving robustness.
More Informative Error Messages
General improvement of error clarity across workflow and activity contexts.
Fixes
Correct Exception Types from Activity & Workflow Contexts
Ensures correct exception propagation and typing consistency.
Sync with Default PHP Timezone
Fixes mismatch between Temporal runtime behavior and PHP default timezone.
Fix PHP 8.4 Deprecations in Tests
Ensures forward compatibility with PHP 8.4.
Upgrade symfony/process Minimum Version
Minimum supported version bumped to 5.4.51.
CODEOWNERS Syntax Fix
PR: #712
Author: @mjameswh
(New contributor)
Testing & CI Improvements
-
Acceptance tests split into Fast / Slow
PR: #708
Author: @xepozz -
Use IP instead of localhost in tests
PR: #713
Author: @xepozz -
Allow continue-on-error in validate-prefer-lowest
PR: #696
Author: @xepozz