Skip to content

Commit 73cf0c0

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: (26 commits) [AssetMapper] Fix: also download files referenced by url() in CSS [AssetMapper] Fix eager imports are not deduplicated [Mime] Add `TemplatedEmail::$locale` to the serialized props fix tests add return types to test fixtures fix merge [Cache] Get TRUNCATE statement from platform do not detect the deserialization_path context value twice fix detecting the database server version [Cache] Add url decoding of password in `RedisTrait` DSN [Serializer] Remove incompatible type declaration with PHP 7.2 [Serializer] Fix test Fix denormalizing empty string into object|null parameter [PropertyInfo] Fixed promoted property type detection for `PhpStanExtractor` [Serializer] Move discrimination to abstract [Serializer] Fix deserialization_path missing using contructor [Serializer] Fix access to private when Ignore [AssetMapper] Adding an option (true by default) to not publish dot files [AssetMapper] Fixing out-of-date test on Windows [HttpKernel] Fix logging deprecations to the "php" channel when channel "deprecation" is not defined ...
2 parents 6bd24a1 + 142bc3a commit 73cf0c0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Mime/TemplatedEmail.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function markAsRendered(): void
100100
*/
101101
public function __serialize(): array
102102
{
103-
return [$this->htmlTemplate, $this->textTemplate, $this->context, parent::__serialize()];
103+
return [$this->htmlTemplate, $this->textTemplate, $this->context, parent::__serialize(), $this->locale];
104104
}
105105

106106
/**
@@ -109,6 +109,7 @@ public function __serialize(): array
109109
public function __unserialize(array $data): void
110110
{
111111
[$this->htmlTemplate, $this->textTemplate, $this->context, $parentData] = $data;
112+
$this->locale = $data[4] ?? null;
112113

113114
parent::__unserialize($parentData);
114115
}

Tests/Mime/TemplatedEmailTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ public function testSerialize()
4343
->textTemplate('text.txt.twig')
4444
->htmlTemplate('text.html.twig')
4545
->context($context = ['a' => 'b'])
46+
->locale($locale = 'fr_FR')
4647
;
4748

4849
$email = unserialize(serialize($email));
4950
$this->assertEquals('text.txt.twig', $email->getTextTemplate());
5051
$this->assertEquals('text.html.twig', $email->getHtmlTemplate());
5152
$this->assertEquals($context, $email->getContext());
53+
$this->assertEquals($locale, $email->getLocale());
5254
}
5355

5456
public function testSymfonySerialize()

0 commit comments

Comments
 (0)