Skip to content

Allow Upper Case property names in ObjectNormalizer #22547

Closed
@insekticid

Description

@insekticid
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version 2.8.19

Same problem that has been fixed here #22265
and here api-platform/core#1037

ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible

class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}

https://github.com/symfony/symfony/blob/v2.8.19/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php#L211

Is it valid, should I try to fix it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions