Skip to content

Commit c00d6aa

Browse files
committed
[FrameworkBundle] Allow .yaml file extension everywhere
1 parent 5198e22 commit c00d6aa

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,10 @@ private function registerValidatorMapping(ContainerBuilder $container, array $co
11771177
foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) {
11781178
$dirname = $bundle['path'];
11791179

1180-
if ($container->fileExists($file = $dirname.'/Resources/config/validation.yml', false)) {
1180+
if (
1181+
$container->fileExists($file = $dirname.'/Resources/config/validation.yaml', false) ||
1182+
$container->fileExists($file = $dirname.'/Resources/config/validation.yml', false)
1183+
) {
11811184
$fileRecorder('yml', $file);
11821185
}
11831186

@@ -1385,7 +1388,10 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
13851388
$fileRecorder('xml', $file);
13861389
}
13871390

1388-
if ($container->fileExists($file = $dirname.'/Resources/config/serialization.yml', false)) {
1391+
if (
1392+
$container->fileExists($file = $dirname.'/Resources/config/serialization.yaml', false) ||
1393+
$container->fileExists($file = $dirname.'/Resources/config/serialization.yml', false)
1394+
) {
13891395
$fileRecorder('yml', $file);
13901396
}
13911397

Resources/config/translation.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</service>
3434

3535
<service id="translation.loader.yml" class="Symfony\Component\Translation\Loader\YamlFileLoader" public="true">
36-
<tag name="translation.loader" alias="yml" />
36+
<tag name="translation.loader" alias="yaml" legacy-alias="yml" />
3737
</service>
3838

3939
<service id="translation.loader.xliff" class="Symfony\Component\Translation\Loader\XliffFileLoader" public="true">
@@ -92,6 +92,11 @@
9292
<tag name="translation.dumper" alias="yml" />
9393
</service>
9494

95+
<service id="translation.dumper.yaml" class="Symfony\Component\Translation\Dumper\YamlFileDumper">
96+
<argument>yaml</argument>
97+
<tag name="translation.dumper" alias="yaml" />
98+
</service>
99+
95100
<service id="translation.dumper.qt" class="Symfony\Component\Translation\Dumper\QtFileDumper" public="true">
96101
<tag name="translation.dumper" alias="ts" />
97102
</service>

0 commit comments

Comments
 (0)