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:
  [DoctrineBridge] Treat firstResult === 0 like null
  [Translation] Refresh local translations if the provider has domains
  [HttpKernel] Fix SessionListener without session in request #46268
  [Notifier] Allow symfony/mercure 0.6 in Mercure bridge
  • Loading branch information
nicolas-grekas committed May 6, 2022
2 parents 3d38cf8 + 1639abc commit 9ba0113
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Command/TranslationPushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$force = $input->getOption('force');
$deleteMissing = $input->getOption('delete-missing');

if (!$domains && $provider instanceof FilteringProvider) {
$domains = $provider->getDomains();
}

// Reading local translations must be done after retrieving the domains from the provider
// in order to manage only translations from configured domains
$localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths);

if (!$domains) {
if ($provider instanceof FilteringProvider) {
$domains = $provider->getDomains();
}

if (!$domains) {
$domains = $this->getDomainsFromTranslatorBag($localTranslations);
}
$domains = $this->getDomainsFromTranslatorBag($localTranslations);
}

if (!$deleteMissing && $force) {
Expand Down

0 comments on commit 9ba0113

Please sign in to comment.