schmittjoh / JMSSerializerBundle

Easily serialize, and deserialize data of any complexity (supports XML, JSON, YAML)
http://jmsyst.com/bundles/JMSSerializerBundle
MIT License
1.8k stars 312 forks source link

command to generete annotations #739

Open karborator opened 5 years ago

karborator commented 5 years ago

Do you plan to support command about generating of jms annotations to entities ?

goetas commented 5 years ago

based on which information?

karborator commented 5 years ago

For example about serializing, type and accessor are needed, maybe the type is available from the @orm time annotation as well and the accessors ?

   *
     * @ORM\Column(name="created_at", type="datetime", nullable=true)
     * @JMS\Type("DateTime")
     * @JMS\Accessor(getter="getCreatedAt", setter="setCreatedAt")
goetas commented 5 years ago

Exacting it from the ORM is possible, I see more potential in extracting it from the future type-hinted properties or from docblocks.

For now is not on my todo-list, but PR are welcome.