Skip to content

Commit

Permalink
Merge branch '5.4' into 6.0
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
nicolas-grekas committed Mar 31, 2022
2 parents f6639cb + e1eb790 commit b2792b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Tests/TranslatorBagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function testIntersect()

$this->assertEquals([
'en' => [
'domain1' => ['bar' => 'bar'],
'domain2' => ['qux' => 'qux'],
'domain1' => ['foo' => 'foo'],
'domain2' => ['baz' => 'baz'],
],
], $this->getAllMessagesFromTranslatorBag($bagResult));
}
Expand Down
5 changes: 4 additions & 1 deletion TranslatorBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ public function intersect(TranslatorBagInterface $intersectBag): self
$obsoleteCatalogue = new MessageCatalogue($locale);

foreach ($operation->getDomains() as $domain) {
$obsoleteCatalogue->add($operation->getObsoleteMessages($domain), $domain);
$obsoleteCatalogue->add(
array_diff($operation->getMessages($domain), $operation->getNewMessages($domain)),
$domain
);
}

$diff->addCatalogue($obsoleteCatalogue);
Expand Down

0 comments on commit b2792b3

Please sign in to comment.