Skip to content

Commit 9885be3

Browse files
committed
sync message serializer code for forward-compatibility
1 parent e92323d commit 9885be3

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/Symfony/Component/Mime/Tests/MessageTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ public function testSymfonySerialize()
202202
"disposition": null,
203203
"name": null,
204204
"encoding": "quoted-printable",
205-
"seekable": null,
206205
"headers": [],
207206
"class": "Symfony\\\\Component\\\\Mime\\\\Part\\\TextPart"
208207
},
@@ -213,7 +212,6 @@ public function testSymfonySerialize()
213212
"disposition": null,
214213
"name": null,
215214
"encoding": "quoted-printable",
216-
"seekable": null,
217215
"headers": [],
218216
"class": "Symfony\\\\Component\\\\Mime\\\\Part\\\\TextPart"
219217
}
@@ -224,15 +222,12 @@ public function testSymfonySerialize()
224222
{
225223
"filename": "text.txt",
226224
"mediaType": "application",
227-
"cid": null,
228-
"handle": null,
229225
"body": "text data",
230226
"charset": null,
231227
"subtype": "octet-stream",
232228
"disposition": "attachment",
233229
"name": "text.txt",
234230
"encoding": "base64",
235-
"seekable": null,
236231
"headers": [],
237232
"class": "Symfony\\\\Component\\\\Mime\\\\Part\\\\DataPart"
238233
}

src/Symfony/Component/Mime/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"symfony/dependency-injection": "^5.4|^6.0",
2727
"symfony/property-access": "^5.4|^6.0",
2828
"symfony/property-info": "^5.4|^6.0",
29-
"symfony/serializer": "^5.4|^6.0"
29+
"symfony/serializer": "^5.4.14|~6.0.14|^6.1.6"
3030
},
3131
"conflict": {
3232
"egulias/email-validator": "~3.0.0",

src/Symfony/Component/Serializer/Normalizer/MimeMessageNormalizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function normalize(mixed $object, string $format = null, array $context =
6565
if ($object instanceof AbstractPart) {
6666
$ret = $this->normalizer->normalize($object, $format, $context);
6767
$ret['class'] = \get_class($object);
68+
unset($ret['seekable'], $ret['cid'], $ret['handle']);
6869

6970
return $ret;
7071
}

0 commit comments

Comments
 (0)