We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d7b60f1 + 7abd902 commit b466760Copy full SHA for b466760
Form/Type/KeyValueType.php
@@ -68,7 +68,14 @@ public function configureOptions(OptionsResolver $resolver)
68
));
69
70
$resolver->setRequired(array('value_type'));
71
- $resolver->setAllowedTypes(array('allowed_keys' => array('null', 'array')));
+
72
+ if (method_exists($resolver, 'setDefined')) {
73
+ // Symfony 2.6+ API
74
+ $resolver->setAllowedTypes('allowed_keys', array('null', 'array'));
75
+ } else {
76
+ // Symfony <2.6 API
77
+ $resolver->setAllowedTypes(array('allowed_keys' => array('null', 'array')));
78
+ }
79
}
80
81
public function getParent()
0 commit comments