@@ -368,7 +368,6 @@ order:
368
368
* ``workflow.[workflow name].completed ``
369
369
* ``workflow.[workflow name].completed.[transition name] ``
370
370
371
-
372
371
``workflow.announce ``
373
372
Triggered for each transition that now is accessible for the subject.
374
373
@@ -378,7 +377,12 @@ order:
378
377
* ``workflow.[workflow name].announce ``
379
378
* ``workflow.[workflow name].announce.[transition name] ``
380
379
381
- You can avoid triggering those events by using the context::
380
+ After a transition is applied, the announce event tests for all available
381
+ transitions. That will trigger all :ref: `guard events <workflow-usage-guard-events >`
382
+ once more, which could impact performance if they include intensive CPU or
383
+ database workloads.
384
+
385
+ If you don't need the announce event, disable it using the context::
382
386
383
387
$workflow->apply($subject, $transitionName, [Workflow::DISABLE_ANNOUNCE_EVENT => true]);
384
388
@@ -509,14 +513,6 @@ missing a title::
509
513
510
514
The optional second argument of ``setBlocked() `` was introduced in Symfony 5.1.
511
515
512
- .. note ::
513
-
514
- When using guard listeners which imply intensive workloads (CPU, Database
515
- or longer-running code blocks), if you only want them to be fired when strictly
516
- necessary (only when ``Workflow::can() `` or ``Workflow::apply() `` is executed),
517
- be sure to disable ``Workflow::DISABLE_ANNOUNCE_EVENT `` as indicated in
518
- :ref: `Choosing which Events to Dispatch <workflow-chosing-events-to-dispatch >`
519
-
520
516
.. _workflow-chosing-events-to-dispatch :
521
517
522
518
Choosing which Events to Dispatch
0 commit comments