10000 [Translator] fix performance issue in MessageCatalogue and catalogue operations by ArtemBrovko · Pull Request #35125 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Translator] fix performance issue in MessageCatalogue and catalogue operations #35125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Translator] Performance improvement in MessageCatalogue and catalogu…
…e operations.
  • Loading branch information
ArtemBrovko committed Dec 28, 2019
commit 5179af4796f09780f7d98d55b7527e6a24d1a761
4 changes: 3 additions & 1 deletion src/Symfony/Component/Translation/MessageCatalogue.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ public function add($messages, $domain = 'messages')
if (!isset($this->messages[$domain])) {
$this->messages[$domain] = $messages;
} else {
$this->messages[$domain] = array_replace($this->messages[$domain], $messages);
foreach ($messages as $id => $message) {
$this->messages[$domain][$id] = $message;
}
}
}

Expand Down
0