File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ You can also specify the context on a per-property basis::
185
185
App\Model\Person :
186
186
attributes :
187
187
createdAt :
188
- context :
189
- datetime_format : ' Y-m-d'
188
+ contexts :
189
+ - { context: { datetime_format: 'Y-m-d' } }
190
190
191
191
.. code-block :: xml
192
192
Original file line number Diff line number Diff line change @@ -466,6 +466,12 @@ The context is accessible in all events except for the ``workflow.guard`` events
466
466
// in an event listener (workflow.guard events)
467
467
$context = $event->getContext(); // returns ['context']
468
468
469
+ .. deprecated :: 6.4
470
+
471
+ Gathering events context is deprecated since Symfony 6.4 and the
472
+ :method: `Symfony\\ Component\\ Workflow\\ Event::getContext ` method will be
473
+ removed in Symfony 7.0.
474
+
469
475
.. note ::
470
476
471
477
The leaving and entering events are triggered even for transitions that stay
You can’t perform that action at this time.
0 commit comments