Skip to content

Commit 4a4f4d2

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [FrameworkBundle] Do not load property_access.xml if the component isn't installed Fixed a few spelling mistakes in Luxembourgish translation
2 parents eedd434 + d7e859e commit 4a4f4d2

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ public function load(array $configs, ContainerBuilder $container)
6060
// will be used and everything will still work as expected.
6161
$loader->load('translation.xml');
6262

63-
// Property access is used by both the Form and the Validator component
64-
$loader->load('property_access.xml');
65-
6663
$configuration = $this->getConfiguration($configs, $container);
6764
$config = $this->processConfiguration($configuration, $configs);
6865

@@ -126,7 +123,7 @@ public function load(array $configs, ContainerBuilder $container)
126123
}
127124

128125
$this->registerAnnotationsConfiguration($config['annotations'], $container, $loader);
129-
$this->registerPropertyAccessConfiguration($config['property_access'], $container);
126+
$this->registerPropertyAccessConfiguration($config['property_access'], $container, $loader);
130127

131128
if (isset($config['serializer'])) {
132129
$this->registerSerializerConfiguration($config['serializer'], $container, $loader);
@@ -781,8 +778,14 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
781778
}
782779
}
783780

784-
private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container)
781+
private function registerPropertyAccessConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader)
785782
{
783+
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
784+
return;
785+
}
786+
787+
$loader->load('property_access.xml');
788+
786789
$container
787790
->getDefinition('property_accessor')
788791
->replaceArgument(0, $config['magic_call'])
@@ -813,6 +816,11 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
813816
$loader->load('serializer.xml');
814817
$chainLoader = $container->getDefinition('serializer.mapping.chain_loader');
815818

819+
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
820+
$container->removeAlias('serializer.property_accessor');
821+
$container->removeDefinition('serializer.normalizer.object');
822+
}
823+
816824
$serializerLoaders = array();
817825
if (isset($config['enable_annotations']) && $config['enable_annotations']) {
818826
$annotationLoader = new Definition(

src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
</trans-unit>
141141
<trans-unit id="38">
142142
<source>This value is not a valid language.</source>
143-
<target>Dëse Wäert aentsprécht kenger gëlteger Sprooch.</target>
143+
<target>Dëse Wäert entsprécht kenger gëlteger Sprooch.</target>
144144
</trans-unit>
145145
<trans-unit id="39">
146146
<source>This value is not a valid locale.</source>
@@ -180,7 +180,7 @@
180180
</trans-unit>
181181
<trans-unit id="48">
182182
<source>This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.</source>
183-
<target>Dëse Wäert sollt exactly {{ limit }} Buschtaf hunn.|Dëse Wäert sollt exakt {{ limit }} Buschtawen hunn.</target>
183+
<target>Dëse Wäert sollt exakt {{ limit }} Buschtaf hunn.|Dëse Wäert sollt exakt {{ limit }} Buschtawen hunn.</target>
184184
</trans-unit>
185185
<trans-unit id="49">
186186
<source>The file was only partially uploaded.</source>
@@ -192,7 +192,7 @@
192192
</trans-unit>
193193
<trans-unit id="51">
194194
<source>No temporary folder was configured in php.ini.</source>
195-
<target>Et gouf keen temporären Dossier an der php.ini konfiguréiert.</target>
195+
<target>Et gouf keen temporären Dossier an der php.ini konfiguréiert oder den temporären Dossier existéiert net.</target>
196196
</trans-unit>
197197
<trans-unit id="52">
198198
<source>Cannot write temporary file to disk.</source>
@@ -304,7 +304,7 @@
304304
</trans-unit>
305305
<trans-unit id="79">
306306
<source>The host could not be resolved.</source>
307-
<target>Den Domain-Numm konnt net opgeléist ginn.</target>
307+
<target>Den Host-Numm konnt net opgeléist ginn.</target>
308308
</trans-unit>
309309
<trans-unit id="80">
310310
<source>This value does not match the expected {{ charset }} charset.</source>

0 commit comments

Comments
 (0)