From a276eb055f30d6de4e32d28f72ea15f9fe81187d Mon Sep 17 00:00:00 2001 From: Peter Rehm Date: Sun, 7 Jun 2015 12:03:08 -0400 Subject: [PATCH] Show the FormType and FormTypeExtension in case of deprecated use of setDefaultOptions --- src/Symfony/Component/Form/ResolvedFormType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/ResolvedFormType.php b/src/Symfony/Component/Form/ResolvedFormType.php index ff0a8057fb..3440324e47 100644 --- a/src/Symfony/Component/Form/ResolvedFormType.php +++ b/src/Symfony/Component/Form/ResolvedFormType.php @@ -212,7 +212,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface $isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractType'; if ($isOldOverwritten && !$isNewOverwritten) { - trigger_error('The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.', E_USER_DEPRECATED); + trigger_error(get_class($this->innerType).': The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.', E_USER_DEPRECATED); } foreach ($this->typeExtensions as $extension) { @@ -225,7 +225,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface $isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractTypeExtension'; if ($isOldOverwritten && !$isNewOverwritten) { - trigger_error('The FormTypeExtensionInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeExtensionInterface with Symfony 3.0.', E_USER_DEPRECATED); + trigger_error(get_class($extension).': The FormTypeExtensionInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeExtensionInterface with Symfony 3.0.', E_USER_DEPRECATED); } } }