Skip to content

refactor(core): the static journal readers accept an ExecutionId (#682) - #1040

Merged
gplanchat merged 1 commit into
mainfrom
refactor/execution-id-slice-1
Oct 9, 2026
Merged

gplanchat merged 1 commit into
mainfrom
refactor/execution-id-slice-1

Conversation

@gplanchat

Copy link
Copy Markdown
Owner

What

First slice of #682. The 13 interfaces and Event::executionId() already take or return an ExecutionId on main. What is left is the helpers whose signature #638 kept on string. This slice takes the three static journal readers:

  • ActivityEventJournal (6 methods, the ticket says 5)
  • WorkflowQueryEvaluator::lastExecutionResult() and hasPendingTimer()
  • ParentChildWorkflowCoordinator::isChildRunActive()

Each parameter widens from string to ExecutionId|string, with the same name. This is the step the engine and the history source took in 5744c7a: no call breaks, so there is no Rector rule or UPGRADE entry yet. AwaitedFact::isJournalledIn(), ChildWorkflowRunner and ParentChildWorkflowCoordinator::onParentClosed() pass the ExecutionId they hold instead of converting it to a string and back. Wire callers (ActivityMessageProcessor, TemporalActivityWorker) still pass the message string.

Checked

  • The new TheJournalHelpersAcceptAnExecutionIdTest fails with a TypeError on the old signatures and passes now.
  • Unit suite: 3763 tests, OK, 172 skipped (no Temporal server).
  • PHPStan: no errors. Psalm: no errors. php-cs-fixer: no diff on the changed files.

Not in this pull request

  • Narrowing these parameters to ExecutionId only. It is breaking and needs a Rector rule: ExecutionIdArgumentRector matches method calls only, so it must learn static calls first, and an UPGRADE entry at the end of "Unreleased".
  • The other helpers of the ticket: RunDashboard::run(), JournalRunHistoryReader, DurableDataCollector, DiagnoseExecutionCommand, DurableBundleTestTrait, ProcessDetail::getRun(), DurableTestCase, JournalAssertions, WorkflowClient::startCron() and pollForCompletion().
  • WorkflowRunDescription::$executionId: the ticket allows either an ExecutionId or an ADR that keeps the string, and does not choose.

Refs #682

@gplanchat
gplanchat merged commit b3403c4 into main Oct 9, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant