serializer
serializer copied to clipboard
Readd getter for MetadataFactory in Serialzier
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Re-add getter for MetadataFactory in Serialzier to make it possible again to override metadata types like this: /** @var \JMS\Serializer\Metadata\PropertyMetadata $itemsMetadata */ $itemsMetadata = $this->serializer->getMetadataFactory()->getMetadataForClass(Content::class)->propertyMetadata['items']; $itemsMetadata->setType($type);
Expected Result
- This code worked in version 1.x and breaks ins version (2.x) 3.x
Actual Result
- Found no other way to achieve the desired type override.