Skip to content

Commit b2792b3

Browse files
Merge branch '5.4' into 6.0
* 5.4: (22 commits) Fix composer on appveyor fix bootstrap_3_layout ChoiceType's expanded label_html [PropertyAccess] Fix typo in PropertyAccessor::readProperty() DocBlock [PropertyInfo] PhpStanExtractor namespace missmatch issue [VarExporter] Fix exporting objects with readonly properties [ExpressionLanguage] Fix matches when the regexp is not valid [Messenger] Add mysql indexes back and work around deadlocks using soft-delete Add BC layer to handle old objects already present in cache [RateLimiter] Always store SlidingWindows with an expiration set [Validator] Fix File constraint invalid max size exception message [Console] Fix exit status on uncaught exception with negative code [Validator] fix #43345 @Assert\DivisibleBy [HttpClient] fix 303 after PUT and sending chunked requests [HttpClient] always send Content-Type when a body is passed [HttpClient] always send Content-Length when a body is passed [HttpClient] fix sending Content-Length/Type for POST Fix merge [HttpClient] fix sending PUT requests with curl Fix locales format in CrowdinProvider Fix intersect in TranslatorBag ...
2 parents f6639cb + e1eb790 commit b2792b3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Tests/TranslatorBagTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function testIntersect()
8282

8383
$this->assertEquals([
8484
'en' => [
85-
'domain1' => ['bar' => 'bar'],
86-
'domain2' => ['qux' => 'qux'],
85+
'domain1' => ['foo' => 'foo'],
86+
'domain2' => ['baz' => 'baz'],
8787
],
8888
], $this->getAllMessagesFromTranslatorBag($bagResult));
8989
}

TranslatorBag.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ public function intersect(TranslatorBagInterface $intersectBag): self
9494
$obsoleteCatalogue = new MessageCatalogue($locale);
9595

9696
foreach ($operation->getDomains() as $domain) {
97-
$obsoleteCatalogue->add($operation->getObsoleteMessages($domain), $domain);
97+
$obsoleteCatalogue->add(
98+
array_diff($operation->getMessages($domain), $operation->getNewMessages($domain)),
99+
$domain
100+
);
98101
}
99102

100103
$diff->addCatalogue($obsoleteCatalogue);

0 commit comments

Comments
 (0)