Add "'property_path' => false" deprecation message for forms

This commit is contained in:
Michaël Perrin 2013-02-05 11:48:13 +01:00
parent 9367a7cd8e
commit badb2b99b0

View File

@ -56,6 +56,10 @@ class FormType extends AbstractType
->setDataMapper($options['compound'] ? new PropertyPathMapper($this->propertyAccessor) : null)
;
if (false === $options['property_path']) {
trigger_error('\'property_path\' => false is deprecated since version 2.1 and will be removed in 2.3. Use \'mapped\' => false instead.', E_USER_DEPRECATED);
}
if ($options['trim']) {
$builder->addEventSubscriber(new TrimListener());
}