Skip to content

Commit 80191a3

Browse files
committed
[Serializer] Fix deprecation wording
1 parent fb65100 commit 80191a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ public function setIgnoredAttributes(array $ignoredAttributes)
119119
/**
120120
* Set attributes to be camelized on denormalize.
121121
*
122-
* @deprecated since 2.7, to be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.
122+
* @deprecated Deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.
123123
*
124124
* @param array $camelizedAttributes
125125
*
126126
* @return self
127127
*/
128128
public function setCamelizedAttributes(array $camelizedAttributes)
129129
{
130-
trigger_error('The setCamelizedAttributes() method has been deprecated. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', E_USER_DEPRECATED);
130+
trigger_error(sprintf('%s is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED);
131131

132132
$attributes = array();
133133
foreach ($camelizedAttributes as $camelizedAttribute) {
@@ -194,15 +194,15 @@ protected function handleCircularReference($object)
194194
/**
195195
* Format an attribute name, for example to convert a snake_case name to camelCase.
196196
*
197-
* @deprecated since 2.7, to be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.
197+
* @deprecated Deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.
198198
*
199199
* @param string $attributeName
200200
*
201201
* @return string
202202
*/
203203
protected function formatAttribute($attributeName)
204204
{
205-
trigger_error('The formatAttribute() method has been deprecated. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', E_USER_DEPRECATED);
205+
trigger_error(sprintf('%s is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter instead.', __METHOD__), E_USER_DEPRECATED);
206206

207207
return $this->nameConverter ? $this->nameConverter->normalize($attributeName) : $attributeName;
208208
}

0 commit comments

Comments
 (0)