php / pecl-file_formats-yaml

YAML-1.1 parser and emitter
https://pecl.php.net/package/yaml
MIT License
71 stars 33 forks source link

YAML 1.2 #64

Open downsider opened 2 years ago

downsider commented 2 years ago

Hi

I'm looking into using this yaml extension to improve performance on yaml parsing for an application I'm working on, but have a question.

My current parser, the Symfony yaml library, supports yaml 1.2, however this extension states explicitly that it only supports 1.1. Is there a reason for this?

Also, what would it take to add support for yaml 1.2?

bd808 commented 2 years ago

It would require at least https://github.com/yaml/libyaml/issues/20. I'm not sure what if any changes would be needed in how this library wraps libyaml or interfaces with PHP internals.

Is there a specific YAML 1.2 feature that you know that you depend on?

downsider commented 2 years ago

Thank you for your reply

It's more that we have a large number of yaml documents that we use and we don't know if they are all 100% compatible with yaml 1.1

For this to be a drop-in replacement for symfony/yaml we would need that compatibility, otherwise we have a much bigger project to review every document to make sure we don't get regression bugs.

andypost commented 8 months ago

There's reference to https://github.com/pantoniou/libfyaml which implementing 1.2 already, according to https://github.com/yaml/libyaml/issues/20#issuecomment-1567371139

EDIT Maybe extension could be build using this library?