Skip to content

Commit 7a0aca6

Browse files
committed
Merge branch 'release/0.12.x'
2 parents 6c400ce + 49ffc64 commit 7a0aca6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Lunr/Ticks/Mqtt/MqttClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ protected function writeToSocket(string $data, ?int $length = NULL): void
237237

238238
if ($this->level->atLeast(AnalyticsDetailLevel::Detailed))
239239
{
240-
$fields['data'] = $this->prepareLogData($message->getContent());
240+
$fields['requestBody'] = $this->prepareLogData($message->getContent());
241241
}
242242
}
243243
elseif ((ord($data[0]) >> 4) == 1)
@@ -246,7 +246,7 @@ protected function writeToSocket(string $data, ?int $length = NULL): void
246246

247247
if ($this->level->atLeast(AnalyticsDetailLevel::Detailed))
248248
{
249-
$fields['data'] = $this->prepareLogData(bin2hex($data));
249+
$fields['requestBody'] = $this->prepareLogData(bin2hex($data));
250250
}
251251
}
252252
elseif ($data == chr(0xe0) . chr(0x00))
@@ -259,7 +259,7 @@ protected function writeToSocket(string $data, ?int $length = NULL): void
259259

260260
if ($this->level->atLeast(AnalyticsDetailLevel::Detailed))
261261
{
262-
$fields['data'] = $this->prepareLogData(bin2hex($data));
262+
$fields['requestBody'] = $this->prepareLogData(bin2hex($data));
263263
}
264264
}
265265

src/Lunr/Ticks/Mqtt/Tests/MqttClientWriteToSocketTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public function testWriteToSocketLogsUnknownMessageAtDetailed(): void
436436
'startTimestamp' => 1734352683.3516,
437437
'endTimestamp' => 1734352683.3516,
438438
'executionTime' => 0.0,
439-
'data' => '31' . $string . '30...',
439+
'requestBody' => '31' . $string . '30...',
440440
'requestHeaders' => '{"qualityOfService":0,"messageId":null,"topic":null,"acknowledgedQualityOfServices":[],"type":"UNKNOWN"}',
441441
];
442442

@@ -540,7 +540,7 @@ public function testWriteToSocketLogsUnknownMessageAtFull(): void
540540
'startTimestamp' => 1734352683.3516,
541541
'endTimestamp' => 1734352683.3516,
542542
'executionTime' => 0.0,
543-
'data' => '31' . $string . '3025e7a4b7d43119',
543+
'requestBody' => '31' . $string . '3025e7a4b7d43119',
544544
'requestHeaders' => '{"qualityOfService":0,"messageId":null,"topic":null,"acknowledgedQualityOfServices":[],"type":"UNKNOWN"}',
545545
];
546546

@@ -742,7 +742,7 @@ public function testWriteToSocketLogsConnectMessageAtDetailed(): void
742742
'startTimestamp' => 1734352683.3516,
743743
'endTimestamp' => 1734352683.3516,
744744
'executionTime' => 0.0,
745-
'data' => $string . '3025...',
745+
'requestBody' => $string . '3025...',
746746
'requestHeaders' => '{"qualityOfService":0,"messageId":null,"topic":null,"acknowledgedQualityOfServices":[],"type":"CONNECT"}',
747747
];
748748

@@ -846,7 +846,7 @@ public function testWriteToSocketLogsConnectMessageAtFull(): void
846846
'startTimestamp' => 1734352683.3516,
847847
'endTimestamp' => 1734352683.3516,
848848
'executionTime' => 0.0,
849-
'data' => $string . '3025e7a4b7d43119',
849+
'requestBody' => $string . '3025e7a4b7d43119',
850850
'requestHeaders' => '{"qualityOfService":0,"messageId":null,"topic":null,"acknowledgedQualityOfServices":[],"type":"CONNECT"}',
851851
];
852852

@@ -1356,7 +1356,7 @@ public function testWriteToSocketLogsMessageAtDetailed(): void
13561356
'startTimestamp' => 1734352683.3516,
13571357
'endTimestamp' => 1734352683.3516,
13581358
'executionTime' => 0.0,
1359-
'data' => $string . '3025...',
1359+
'requestBody' => $string . '3025...',
13601360
'requestHeaders' => '{"qualityOfService":0,"messageId":null,"topic":null,"acknowledgedQualityOfServices":[],"type":"PUBLISH"}',
13611361
];
13621362

@@ -1468,7 +1468,7 @@ public function testWriteToSocketLogsMessageAtFull(): void
14681468
'startTimestamp' => 1734352683.3516,
14691469
'endTimestamp' => 1734352683.3516,
14701470
'executionTime' => 0.0,
1471-
'data' => $string . '3025e7a4b7d43119',
1471+
'requestBody' => $string . '3025e7a4b7d43119',
14721472
'requestHeaders' => '{"qualityOfService":0,"messageId":null,"topic":null,"acknowledgedQualityOfServices":[],"type":"PUBLISH"}',
14731473
];
14741474

@@ -1575,7 +1575,7 @@ public function testWriteToSocketLogsWithContentNull(): void
15751575
'startTimestamp' => 1734352683.3516,
15761576
'endTimestamp' => 1734352683.3516,
15771577
'executionTime' => 0.0,
1578-
'data' => NULL,
1578+
'requestBody' => NULL,
15791579
'requestHeaders' => '{"qualityOfService":0,"messageId":null,"topic":null,"acknowledgedQualityOfServices":[],"type":"PUBLISH"}',
15801580
];
15811581

0 commit comments

Comments
 (0)