Skip to content

Commit e493a1b

Browse files
committed
minor #20464 [Workflow] Set the marking then announce enabled transition (lyrixx)
This PR was merged into the 3.2-dev branch. Discussion ---------- [Workflow] Set the marking then announce enabled transition | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - It allows to auto-apply some transition from a listener. If we don't do that, the marking is not updated in the listener yet, so the transition is not really enabled. The feature was asked on [twitter](https://twitter.com/gaetanbuellet/status/796387741420441600) And It has been implemented (userland) [here](lyrixx/SFLive-Paris2016-Workflow@9fda92a) Commits ------- 51dad72 [Workflow] Set the marking then announce enabled transition
2 parents cd8b9d9 + 51dad72 commit e493a1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Workflow/Workflow.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ public function apply($subject, $transitionName)
126126

127127
$this->enter($subject, $transition, $marking);
128128

129-
$this->announce($subject, $transition, $marking);
130-
131129
$this->markingStore->setMarking($subject, $marking);
132130

131+
$this->announce($subject, $transition, $marking);
132+
133133
return $marking;
134134
}
135135

0 commit comments

Comments
 (0)