I'am trying to add an extension-attribute to Magento_Customer like this:
<extension_attributes for="Magento\Customer\Api\Data\CustomerInterface"> <attribute code="some_attribute" type="\DateTime" /> </extension_attributes>
The goal is to have a datetime-Column in SQL and an \DateTime-Object in PHP.
But every time I try to do this it somehow ends in an reflection error like this:
1 exception(s): Exception #0 (InvalidArgumentException): Each getter must have a doc block. See DateTime::format()
I've tried to wrap this in an extra getter/setter-Class and not to use \DateTime directly as an extension attribute but at some point is has to return \DateTime from a getter and this will also be picked up recursively by the reflections implementation of Magento2.
What am I missing here ?