Skip to content

Commit 9599bff

Browse files
committed
feature #15582 [Workflow] Document Marking::getContext() (lyrixx)
This PR was merged into the 5.4 branch. Discussion ---------- [Workflow] Document `Marking::getContext()` fixes #15475 Commits ------- f66a0b3 [Workflow] Document marking::getContext()
2 parents d3d2c6d + f66a0b3 commit 9599bff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

workflow.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,17 @@ workflow leaves a place::
446446
}
447447
}
448448

449+
.. versionadded:: 5.4
450+
451+
Getting the up-to-date context was introduced in Symfony 5.4.
452+
453+
If some listeners update the context during a transition, you can retrieve it via the marking::
454+
455+
$marking = $workflow->apply($post, 'to_review');
456+
457+
// Contains the new value
458+
$marking->getContext();
459+
449460
.. _workflow-usage-guard-events:
450461

451462
Guard Events

0 commit comments

Comments
 (0)