Skip to content

Commit f66a0b3

Browse files
committed
[Workflow] Document marking::getContext()
1 parent 1bddd35 commit f66a0b3

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)