$this->requestStack =
$requestStack;
} public function collect(Request
$request, Response
$response, \Throwable
$exception = null
): void
{ $this->currentRequest =
$this->requestStack &&
$this->requestStack->
getMainRequest() !==
$request ?
$request : null;
} public function lateCollect(): void
{ if ($this->logger
) { $containerDeprecationLogs =
$this->
getContainerDeprecationLogs();
$this->data =
$this->
computeErrorsCount($containerDeprecationLogs);
// get compiler logs later (only when they are needed) to improve performance
$this->data
['compiler_logs'
] =
[];
$this->data
['compiler_logs_filepath'
] =
$this->containerPathPrefix.'Compiler.log';
$this->data
['logs'
] =
$this->
sanitizeLogs(array_merge($this->logger->
getLogs($this->currentRequest
),
$containerDeprecationLogs));
$this->data =
$this->
cloneVar($this->data
);
} $this->currentRequest = null;
} public function getLogs(): Data|array
{