Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #294 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 333 335 +2
===========================================
Files 47 47
Lines 1377 1384 +7
===========================================
+ Hits 1377 1384 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rmcdaniel
pushed a commit
that referenced
this pull request
Apr 16, 2026
Mirror the helpers under Workflow\V2\functions.php as static methods on
the Workflow abstract base class so v2 authors can write:
use Workflow\V2\Workflow;
final class MyWorkflow extends Workflow
{
public function handle(): mixed
{
$result = Workflow::activity(SendEmail::class, $input);
Workflow::timer('5 seconds');
Workflow::upsertMemo(['stage' => 'done']);
return $result;
}
}
Each static is a thin delegate to the equivalent namespaced helper
(activity, child, async, all, parallel, await, awaitWithTimeout,
awaitSignal, timer, sideEffect, continueAsNew, getVersion, upsertMemo,
upsertSearchAttributes, seconds/minutes/hours/days/weeks/months/years,
plus executeActivity and executeChildWorkflow aliases). The namespaced
helpers remain in place as the functional-style alternative.
The existing instance convenience `$this->child()` — which returns the
most recently spawned ChildWorkflowHandle — conflicted with the new
static `Workflow::child(...)` spawn API. Renamed the instance method to
`$this->lastChild()` and updated the four V2 test fixtures that used
it. No v1 back-compat shim is needed because v2 is unpublished.
Also update the v2 scaffolding stub to show Workflow:: usage in a
commented example so new workflows ship with the facade-idiomatic form.
docs/api-stability.md now documents the authoring facade as part of the
v2 public API surface alongside the Contracts\* interfaces and the
server-facing Support\* stability list.
Deferred from #171 to a follow-up: `Workflow::now()` (needs new
deterministic workflow-time machinery), and the `startActivity` /
`startChild` fire-and-forget variants (not yet represented in the
runtime primitives).
Refs #294 (blocker), #171.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Amazon SQS has a maximum message delay of 15 minutes (900 seconds). When using WorkflowStub::timer() or WorkflowStub::awaitWithTimeout() with delays greater than 900 seconds on an SQS queue, the workflow would fail.
Solution
When the queue driver is SQS, cap the Signal dispatch delay at 900 seconds. The workflow will automatically wake up after 900 seconds, check if enough time has passed, and if not, schedule another delay. This chunking process repeats until the full timer duration has elapsed.