Skip to content

refactor(workflow)!: the Saga helper becomes Compensation (#993) - #1038

Merged
gplanchat merged 7 commits into
mainfrom
refactor/saga-to-compensation
Oct 9, 2026
Merged

gplanchat merged 7 commits into
mainfrom
refactor/saga-to-compensation

Conversation

@gplanchat

@gplanchat gplanchat commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

What

I rename the Gplanchat\Durable\Workflow\Saga helper to Compensation, so that the word Saga is free for the later rename of Workflow. Methods are unchanged. The helper keeps its compensations in the workflow's memory and stores nothing, so no table, journal event, queue message or Temporal marker carries the old name.

  • A RenameClassRector entry in durable-upgrade.php, with a fixture (use, new, type declarations, docblock).
  • The class and its test renamed; the unmigratable-call message now points at Durable\Workflow\Compensation (the Temporal Saga class it reports is unchanged).
  • The cancellation and comparison pages (English and French), OST004 and the living OpenSpec task.
  • An UPGRADE section at the end of "Unreleased". No class_alias.

Migration

Run the Rector set (vendor/bin/rector process src). Variables named $saga keep their name. Rector rewrites each use to the full Compensation name and leaves the old use ...\Saga; import (aliased or not) in place; it is unused and harmless, and UPGRADE.md says it can be deleted by hand. The fixture now covers an aliased import.

Checked

Unit suite: 3260 tests pass. PHPStan and Psalm report no errors. php-cs-fixer dry-run is clean on the four changed PHP files. The assertion of the reports_the_saga_helper fixture changes with the message it checks.

The saga keyword in three composer.json files is left for the owner (hard limit).

Refs #993 #990

@gplanchat
gplanchat merged commit 7e29910 into main Oct 9, 2026
47 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