Skip to content

Commit e81d501

Browse files
committed
minor symfony#13844 Add documentation about data collectors late collect (l-vo)
This PR was merged into the 3.4 branch. Discussion ---------- Add documentation about data collectors late collect Commits ------- 2e32d45 Add documentation about data collectors late collect
2 parents d270ebd + 2e32d45 commit e81d501

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

profiler/data_collector.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ request::
7979
:doc:`/testing/profiling`) so it's recommended to return a string which is
8080
short, lowercase and without white spaces.
8181

82+
Note that the data collect is triggered belatedly during the :ref:`kernel.response <component-http-kernel-kernel-response>` event. If you need to collect data that is only available
83+
later, you should implement :class:`Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface` and its :method:`Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface::lateCollect` method which is invoked just before
84+
the profiler data serialization (during :ref:`kernel.terminate <component-http-kernel-kernel-terminate>` phase).
85+
8286
.. _data_collector_tag:
8387

8488
Enabling Custom Data Collectors

0 commit comments

Comments
 (0)