[Form] Catch deprecation errors that are caused by BC code
This commit is contained in:
parent
ebcb432f07
commit
b8cdbdc69f
@ -51,8 +51,10 @@ abstract class AbstractType implements FormTypeInterface
|
|||||||
*/
|
*/
|
||||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
{
|
{
|
||||||
|
set_error_handler(array('Symfony\Component\Form\Tests\DeprecationErrorHandler', 'handleBC'));
|
||||||
$resolver->setDefaults($this->getDefaultOptions(array()));
|
$resolver->setDefaults($this->getDefaultOptions(array()));
|
||||||
$resolver->addAllowedValues($this->getAllowedOptionValues(array()));
|
$resolver->addAllowedValues($this->getAllowedOptionValues(array()));
|
||||||
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,8 +44,10 @@ abstract class AbstractTypeExtension implements FormTypeExtensionInterface
|
|||||||
*/
|
*/
|
||||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
{
|
{
|
||||||
|
set_error_handler(array('Symfony\Component\Form\Tests\DeprecationErrorHandler', 'handleBC'));
|
||||||
$resolver->setDefaults($this->getDefaultOptions());
|
$resolver->setDefaults($this->getDefaultOptions());
|
||||||
$resolver->addAllowedValues($this->getAllowedOptionValues());
|
$resolver->addAllowedValues($this->getAllowedOptionValues());
|
||||||
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user