Skip to content

Commit e86c2c9

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Add documentation about data collectors late collect
2 parents 52fc706 + 468e52a commit e86c2c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

profiler/data_collector.rst

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

82+
The ``collect()`` method is called during the :ref:`kernel.response <component-http-kernel-kernel-response>`
83+
event. If you need to collect data that is only available later, implement
84+
:class:`Symfony\\Component\\HttpKernel\\DataCollector\\LateDataCollectorInterface`
85+
and define the ``lateCollect()`` method, which is invoked just before the profiler
86+
data serialization (during :ref:`kernel.terminate <component-http-kernel-kernel-terminate>` event).
87+
8288
.. _data_collector_tag:
8389

8490
Enabling Custom Data Collectors

0 commit comments

Comments
 (0)