Skip to content

Commit e19c300

Browse files
committed
[Form] made deprecation notice more precise
1 parent a48f520 commit e19c300

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FormRegistry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function getType($name)
101101
}
102102

103103
if (isset($this->legacyNames[$name])) {
104-
@trigger_error('Accessing types by their string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name instead.', E_USER_DEPRECATED);
104+
@trigger_error(sprintf('Accessing type "%s" by its string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name "%s" instead.', $name, get_class($this->types[$name]->getInnerType())), E_USER_DEPRECATED);
105105
}
106106

107107
return $this->types[$name];
@@ -171,7 +171,7 @@ private function resolveAndAddType(FormTypeInterface $type)
171171
public function hasType($name)
172172
{
173173
if (isset($this->legacyNames[$name])) {
174-
@trigger_error('Accessing types by their string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name instead.', E_USER_DEPRECATED);
174+
@trigger_error(sprintf('Accessing type "%s" by its string name is deprecated since version 2.8 and will be removed in 3.0. Use the fully-qualified type class name "%s" instead.', $name, get_class($this->types[$name]->getInnerType())), E_USER_DEPRECATED);
175175
}
176176

177177
if (isset($this->types[$name])) {

0 commit comments

Comments
 (0)