Skip to content

Symfony YAML parser doesn't handle complex YAML format #20579

@BourotBenjamin

Description

@BourotBenjamin

As described here :
http://yaml.org/spec/1.2/spec.html#id2760395

A question mark and space (“? ”) indicate a complex mapping key.

But, when I try to load a valid YAML file using complex mappig, I got an error :

Error parsing YAML, invalid file "diet.fr.yml"

ParseException: Unable to parse at line 3 (near "? "1"").

My file content :

---
diet:
  ? "1"
  :
    name: végétalien

As PECL YAML extension ( https://pecl.php.net/package/yaml ) exists, works fine and seems more complete than symfony's one, wouldn't be more simple to replace Symfony's YAML component by php extension ?

What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy