Skip to content

Commit 0cd1879

Browse files
committed
[TwigComponent] Fix full context is stored in profiler
As $event->getVariables() get the full context for non-embed components, this led to huge data stored for every component called during the request. As this is internal data, and the "variables" was not used in the profiler, I believe we should consider this a bug and simply remove it.
1 parent 9c7a811 commit 0cd1879

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/TwigComponent/src/DataCollector/TwigComponentDataCollector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ private function collectDataFromLogger(): void
124124
'is_embed' => $event->isEmbedded(),
125125
'input_props' => $mountedComponent->getInputProps(),
126126
'attributes' => $mountedComponent->getAttributes()->all(),
127-
'variables' => $event->getVariables(),
128127
'template_index' => $event->getTemplateIndex(),
129128
'component' => $mountedComponent->getComponent(),
130129
'depth' => \count($ongoingRenders),

0 commit comments

Comments
 (0)