Skip to content

Commit 2cfe53d

Browse files
committed
Merge branch '3.4'
* 3.4: (83 commits) add missing version attribute Show exception is checked twice in ExceptionController of twig allow SSI fragments configuration in XML files Display a better error message when the toolbar cannot be displayed [SecurityBundle] Add user impersonation info and exit action to the profiler render hidden _method field in form_rest() Add Doctrine Cache to dev dependencies to fix failing unit tests. return fallback locales whenever possible Fix Predis client cluster with pipeline [Dotenv] Test load() with multiple paths [Console] Fix catching exception type in QuestionHelper Improved the exception page when there is no message [WebProfilerBundle] Eliminate line wrap on count columnt (routing) [Profiler][Validator] Add a validator panel in profiler [Validator] replace hardcoded service id [Routing] Fix XmlFileLoader exception message Remove duplicate changelog entries [DI] Dedup tags when using instanceof/autoconfigure [Translation] Fix FileLoader::loadResource() php doc [Serializer] Fix workaround min php version ...
2 parents 7a58693 + 7403f37 commit 2cfe53d

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

DataCollectorTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function getCatalogue($locale = null)
9797
*/
9898
public function getFallbackLocales()
9999
{
100-
if ($this->translator instanceof Translator) {
100+
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
101101
return $this->translator->getFallbackLocales();
102102
}
103103

Dumper/YamlFileDumper.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
*/
2424
class YamlFileDumper extends FileDumper
2525
{
26+
private $extension;
27+
28+
public function __construct(/**string */$extension = 'yml')
29+
{
30+
$this->extension = $extension;
31+
}
32+
2633
/**
2734
* {@inheritdoc}
2835
*/
@@ -50,6 +57,6 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti
5057
*/
5158
protected function getExtension()
5259
{
53-
return 'yml';
60+
return $this->extension;
5461
}
5562
}

Loader/FileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function load($resource, $locale, $domain = 'messages')
5454
return $catalogue;
5555
}
5656

57-
/*
57+
/**
5858
* @param string $resource
5959
*
6060
* @return array

LoggingTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function getCatalogue($locale = null)
9696
*/
9797
public function getFallbackLocales()
9898
{
99-
if ($this->translator instanceof Translator) {
99+
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
100100
return $this->translator->getFallbackLocales();
101101
}
102102

0 commit comments

Comments
 (0)