Skip to content

Commit ba6f65d

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: docs: encodedEnvelope is already an array
2 parents dc0d5c8 + 7a2c7a9 commit ba6f65d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

messenger.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,12 +3062,10 @@ Let's say you want to create a message decoder::
30623062
{
30633063
public function decode(array $encodedEnvelope): Envelope
30643064
{
3065-
$envelope = \json_decode($encodedEnvelope, true);
3066-
30673065
try {
30683066
// parse the data you received with your custom fields
3069-
$data = $envelope['data'];
3070-
$data['token'] = $envelope['token'];
3067+
$data = $encodedEnvelope['data'];
3068+
$data['token'] = $encodedEnvelope['token'];
30713069

30723070
// other operations like getting information from stamps
30733071
} catch (\Throwable $throwable) {

0 commit comments

Comments
 (0)