From c040dab378b09c7b6b02741c0e5da6be91b4b8f1 Mon Sep 17 00:00:00 2001 From: Marek Snopkowski Date: Tue, 24 Aug 2021 13:10:36 +0200 Subject: [PATCH] Remove both "normal" and ICU domain from messages set https://github.com/php-translation/symfony-bundle/issues/300 --- Catalogue/CatalogueFetcher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Catalogue/CatalogueFetcher.php b/Catalogue/CatalogueFetcher.php index 504d305..cef5a24 100644 --- a/Catalogue/CatalogueFetcher.php +++ b/Catalogue/CatalogueFetcher.php @@ -53,8 +53,8 @@ public function getCatalogues(Configuration $config, array $locales = []): array foreach ($currentCatalogue->getDomains() as $domain) { if (!$this->isValidDomain($config, $domain)) { - $messages = $currentCatalogue->all(); - unset($messages[$domain]); + $messages = NSA::getProperty($currentCatalogue, 'messages'); + unset($messages[$domain], $messages[$domain . '+intl-icu' /* MessageCatalogueInterface::INTL_DOMAIN_SUFFIX */]); NSA::setProperty($currentCatalogue, 'messages', $messages); } }