schmittjoh / serializer

Library for (de-)serializing data of any complexity (supports JSON, and XML)
http://jmsyst.com/libs/serializer
MIT License
2.32k stars 585 forks source link

What happened to yml support? #1441

Closed maiermic closed 1 year ago

maiermic commented 1 year ago

I used this library in the past (version 1.X) to serialize YML. However, running

$context = new SerializationContext();
$context->setSerializeNull(true);
$serializer = SerializerBuilder::create()->build();
return $serializer->serialize($data, 'yml', $context);

with the latest version 3.18.2 results in

Uncaught JMS\Serializer\Exception\UnsupportedFormatException: The format "yml" is not supported for serialization.

According to packagist the format is still supported:

Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.

However, the Github README.md does not mention YAML support

Currently, it supports XML and JSON.

Is the description on packagist out of date? Is YAML not supported anymore? I haven't seen a note about a removal in the changelog. It seems to be configurable, but I haven't found any example in the documentation on how to configure it.


Thanks for maintaining this library ❤️

scyzoryck commented 1 year ago

Hi @maiermic!

YML support has been removed in 2.0 with all related code. It looks like packagist description is outdated.

Best, scyzoryck.

maiermic commented 1 year ago

Thanks, may I ask, why it has been removed?

scyzoryck commented 1 year ago

Hard to say - it was long time ago. :D May @goetas will add something it the topic, I can guess that the reasons could be: