[Form] Enhance some FormRegistry deprecation messages
This commit is contained in:
parent
fef28b2fa1
commit
02d2148f37
@ -67,7 +67,7 @@ class FormPass implements CompilerPassInterface
|
|||||||
@trigger_error('The alias option of the form.type_extension tag is deprecated since version 2.8 and will be removed in 3.0. Use the extended_type option instead.', E_USER_DEPRECATED);
|
@trigger_error('The alias option of the form.type_extension tag is deprecated since version 2.8 and will be removed in 3.0. Use the extended_type option instead.', E_USER_DEPRECATED);
|
||||||
$extendedType = $tag[0]['alias'];
|
$extendedType = $tag[0]['alias'];
|
||||||
} else {
|
} else {
|
||||||
@trigger_error('The extended_type option of the form.type_extension tag is required since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
@trigger_error('The extended_type option of the form.type_extension tag is required since version 2.8.', E_USER_DEPRECATED);
|
||||||
$extendedType = $serviceId;
|
$extendedType = $serviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ class FormRegistry implements FormRegistryInterface
|
|||||||
$hasCustomName = $name !== $fqcn;
|
$hasCustomName = $name !== $fqcn;
|
||||||
|
|
||||||
if ($parentType instanceof FormTypeInterface) {
|
if ($parentType instanceof FormTypeInterface) {
|
||||||
@trigger_error('Returning a FormTypeInterface from FormTypeInterface::getParent() is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
@trigger_error(sprintf('Returning a FormTypeInterface from %s::getParent() is deprecated since version 2.8 and will be removed in 3.0. Return the fully-qualified type class name instead.', $fqcn), E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->resolveAndAddType($parentType);
|
$this->resolveAndAddType($parentType);
|
||||||
$parentType = $parentType->getName();
|
$parentType = $parentType->getName();
|
||||||
@ -128,14 +128,11 @@ class FormRegistry implements FormRegistryInterface
|
|||||||
|
|
||||||
if ($hasCustomName) {
|
if ($hasCustomName) {
|
||||||
foreach ($this->extensions as $extension) {
|
foreach ($this->extensions as $extension) {
|
||||||
$typeExtensions = array_merge(
|
if ($x = $extension->getTypeExtensions($name)) {
|
||||||
$typeExtensions,
|
@trigger_error(sprintf('Returning a type name from %s::getExtendedType() is deprecated since version 2.8 and will be removed in 3.0. Return the fully-qualified type class name instead.', get_class($x[0])), E_USER_DEPRECATED);
|
||||||
$extension->getTypeExtensions($name)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($typeExtensions) {
|
$typeExtensions = array_merge($typeExtensions, $x);
|
||||||
@trigger_error('Returning a type name from FormTypeExtensionInterface::getExtendedType() is deprecated since version 2.8 and will be removed in 3.0. Return the fully-qualified type class name instead.', E_USER_DEPRECATED);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user