BazingaHateoasBundle icon indicating copy to clipboard operation
BazingaHateoasBundle copied to clipboard

Enable Metadata\MetadataFactory::setIncludeInterfaces()

Open lstrojny opened this issue 4 years ago • 2 comments

Any particular reason why Metadata\MetadataFactory::setIncludeInterfaces() is not enabled per default and/or no setting exists. Would be cool to use interfaces for shared metadata.

lstrojny avatar Oct 01 '20 18:10 lstrojny

I realized this might sound demanding, which is not what I meant. Much rather: has this been considered before?

lstrojny avatar Oct 01 '20 19:10 lstrojny

jms serializer uses the same strategy, and since this library is just a plugin for the serializer, it has to follow the same.

On the other side, in jms that decision has been taken to avoid some unexpected behaviors when defining metadata (makes harder to override metadata). It has been used a simple rule "metadata are per-class" anything else (interfaces, traits) is just ignored.

goetas avatar Oct 03 '20 10:10 goetas