serializer
serializer copied to clipboard
How to allow custom metadata for fields?
Since we can have custom handler and custom exclusion rules, it makes sense to be able to allow the yml/xml/annotation driver to accepts and store additional/custom configuration key that will be later used.
Right now I see they are hardcoded in the driver files which means we probably have to override them to add our own configs. Is it the way to go now or there are other ways?
I just bumped into this issue too.
It looks like there might be two issues that need to be sorted out for this work well:
- Consolidate the construction of property metadata.
- Store unrecognized property metadata into a
$custom
field onPropertyMetadata
.
While #1 isn't really required, it would certainly save a lot of headaches in having to implement new features for each and every driver provided by this library.
👍 It'd be very useful to be able to add custom metadata to properties! Looking at the code it seems that this is still impossible today, isn't it?