From 612ec53fa615dabcc9341712bc5674496d7d1a43 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 13 Apr 2022 13:38:48 +0200 Subject: [PATCH] move versionadded directive out of list item This information is not only related to the `workflow.announce` event, but provides important information for other events too. --- workflow.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/workflow.rst b/workflow.rst index b44b417f333..5d972858c28 100644 --- a/workflow.rst +++ b/workflow.rst @@ -386,17 +386,17 @@ order: The ``Workflow::DISABLE_ANNOUNCE_EVENT`` constant was introduced in Symfony 5.1. - .. versionadded:: 5.2 +.. versionadded:: 5.2 - In Symfony 5.2, the context is customizable for all events except for - ``workflow.guard`` events, which will not receive the custom ``$context``:: + In Symfony 5.2, the context is customizable for all events except for + ``workflow.guard`` events, which will not receive the custom ``$context``:: - // $context must be an array - $context = ['context_key' => 'context_value']; - $workflow->apply($subject, $transitionName, $context); + // $context must be an array + $context = ['context_key' => 'context_value']; + $workflow->apply($subject, $transitionName, $context); - // in an event listener - $context = $event->getContext(); // returns ['context'] + // in an event listener + $context = $event->getContext(); // returns ['context'] .. note::