fix: add suffix to request id in xml-dump filenames to avoid overwrites

This commit is contained in:
Björn Fromme
2026-03-16 12:02:27 +01:00
parent 30496a4875
commit 7f4cf3060e
+5 -2
View File
@@ -49,6 +49,7 @@ class ApiClient
private array $config;
private float $operationStartTime;
private int $selectedPort;
private int $requestCounter = 0;
public function __construct(
private readonly SerializerInterface $serializer,
@@ -689,8 +690,10 @@ class ApiClient
private function getRequestId(): string
{
return $this->requestStack->getMainRequest()?->attributes->get('request_id')
?? date(DATE_ATOM).uniqid();
$baseId = $this->requestStack->getMainRequest()?->attributes->get('request_id')
?? date(DATE_ATOM);
return $baseId . '_' . ++$this->requestCounter;
}
private function createKey(string $username, string $password, string $type): string