GetSetMethodNormalizer uses lcfirst instead of strtolower when computing method names
This commit is contained in:
parent
01fcb1bdd7
commit
85bf553cca
@ -46,7 +46,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
|
||||
$attributes = array();
|
||||
foreach ($reflectionMethods as $method) {
|
||||
if ($this->isGetMethod($method)) {
|
||||
$attributeName = strtolower(substr($method->getName(), 3));
|
||||
$attributeName = lcfirst(substr($method->getName(), 3));
|
||||
|
||||
$attributeValue = $method->invoke($object);
|
||||
if (null !== $attributeValue && !is_scalar($attributeValue)) {
|
||||
@ -73,7 +73,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
|
||||
|
||||
$params = array();
|
||||
foreach ($constructorParameters as $constructorParameter) {
|
||||
$paramName = strtolower($constructorParameter->getName());
|
||||
$paramName = lcfirst($constructorParameter->getName());
|
||||
|
||||
if (isset($data[$paramName])) {
|
||||
$params[] = $data[$paramName];
|
||||
|
Reference in New Issue
Block a user