Closed lemoinem closed 8 years ago
hm, that is strange... @WouterJ any idea where this if
came from?
I'm merging this for now since I'm not getting a response. Assuming it was probably a mistake.
This IF is usefull, but I only copy/pasted the code instead of editing.
It should be:
if (method_exists($resolver, 'setDefined')) {
// Symfony 2.6+ API
$resolver->setAllowedTypes('allowed_keys', array('null', 'array'));
} else {
// Symfony <2.6 API
$resolver->setAllowedTypes(array('allowed_keys' => array('null', 'array')));
}
(btw, sorry for my slow response, this slipped through the mention list)
Thanks WouterJ for the answer! I created a PR to put the IF back and fix the compatibility
This
if
seems dubious since both its branches are the exact same code.It was introduced by @WouterJ while introducing support for Symfony 3.0, maybe I missed something and it IS useful...