Repository navigation
refactor(workflow)!: the Saga helper becomes Compensation (#993) - #1038
Merged
Merged
Conversation
…say the helper runs compensations in reverse (#993)
gplanchat
added a commit
that referenced
this pull request
Oct 9, 2026
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.
What
I rename the
Gplanchat\Durable\Workflow\Sagahelper toCompensation, 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.RenameClassRectorentry indurable-upgrade.php, with a fixture (use,new, type declarations, docblock).Durable\Workflow\Compensation(the TemporalSagaclass it reports is unchanged).class_alias.Migration
Run the Rector set (
vendor/bin/rector process src). Variables named$sagakeep their name. Rector rewrites each use to the fullCompensationname and leaves the olduse ...\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_helperfixture changes with the message it checks.The
sagakeyword in threecomposer.jsonfiles is left for the owner (hard limit).Refs #993 #990