minor #16818 [Form] Improve deprecation notice to mention the affected service id (apfelbox)
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] Improve deprecation notice to mention the affected service id
| Q | A
| ------------- | ---
| Bug fix? |no
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This fix changes the deprecation notice to mention the affected service id. Without this update it is quite annoying to find the service with the deprecated definition.
Commits
-------
0b9ea95
Improve form deprecation notices to mention the affected service ids
This commit is contained in:
commit
47258df50c
@ -64,10 +64,10 @@ class FormPass implements CompilerPassInterface
|
|||||||
if (isset($tag[0]['extended_type'])) {
|
if (isset($tag[0]['extended_type'])) {
|
||||||
$extendedType = $tag[0]['extended_type'];
|
$extendedType = $tag[0]['extended_type'];
|
||||||
} elseif (isset($tag[0]['alias'])) {
|
} elseif (isset($tag[0]['alias'])) {
|
||||||
@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(sprintf('The alias option of the form.type_extension tag of service "%s" is deprecated since version 2.8 and will be removed in 3.0. Use the extended_type option instead.', $serviceId), 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.', E_USER_DEPRECATED);
|
@trigger_error(sprintf('The extended_type option of the form.type_extension tag of service "%s" is required since version 2.8.', $serviceId), E_USER_DEPRECATED);
|
||||||
$extendedType = $serviceId;
|
$extendedType = $serviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user