From f66a0b3098a96becc0e8d38c1ad2d9d04d0e1fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Tue, 3 Aug 2021 18:07:04 +0200 Subject: [PATCH] [Workflow] Document marking::getContext() --- workflow.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/workflow.rst b/workflow.rst index 1d70f38b0d6..97880c16d13 100644 --- a/workflow.rst +++ b/workflow.rst @@ -446,6 +446,17 @@ workflow leaves a place:: } } +.. versionadded:: 5.4 + + Getting the up-to-date context was introduced in Symfony 5.4. + +If some listeners update the context during a transition, you can retrieve it via the marking:: + + $marking = $workflow->apply($post, 'to_review'); + + // Contains the new value + $marking->getContext(); + .. _workflow-usage-guard-events: Guard Events