Skip to content

Commit c80526b

Browse files
committed
[Validation][FrameworkBundle] Allow EnableAutoMapping to work without auto-mapping namespaces
1 parent fbff912 commit c80526b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
861861
->end()
862862
->end()
863863
->arrayNode('auto_mapping')
864-
->info('A collection of namespaces for which auto-mapping will be enabled.')
864+
->info('A collection of namespaces for which auto-mapping will be enabled by default, or null to opt-in with the EnableAutoMapping constraint.')
865865
->example([
866866
'App\\Entity\\' => [],
867867
'App\\WithSpecificLoaders\\' => ['validator.property_info_loader'],

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
13121312
}
13131313

13141314
$container->setParameter('validator.auto_mapping', $config['auto_mapping']);
1315-
if (!$propertyInfoEnabled || !$config['auto_mapping'] || !class_exists(PropertyInfoLoader::class)) {
1315+
if (!$propertyInfoEnabled || !class_exists(PropertyInfoLoader::class)) {
13161316
$container->removeDefinition('validator.property_info_loader');
13171317
}
13181318

0 commit comments

Comments
 (0)