Development

#8082 (Certain YAML parsing fails)

You must first sign up to be able to contribute.

Ticket #8082 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Certain YAML parsing fails

Reported by: evil3 Assigned to: fabien
Priority: minor Milestone:
Component: yaml Version: 1.4.1
Keywords: Cc:
Qualification: Unreviewed

Description

Trying to parse the following YAML file with sfYaml::load() results in an error. It does not recognise the map in key syntax. https://gist.github.com/272999/e79b272c8b4cd053a38c1156231117866d925242

With slight alterations it can be parsed. https://gist.github.com/272999

Since that syntax is allowed in YAML as far as I know, I believe this should be supported.

I am using the latest SVN trunk.

Change History

02/23/10 12:03:52 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [28206]) [YAML] added support for compact notation (patch from redotheoffice - closes #8082)

02/23/10 14:11:17 changed by Seldaek

This patch just broke our DI SC parsing in okapi. I'm investigating to see what exactly.

02/23/10 14:26:54 changed by Seldaek

Ok, we had this syntax in a few files:

# Before: triggers Notice: Undefined index: resource in sfServiceContainerLoaderFileYaml.php on line 89

imports:
  - { resource: default.yml, class: sfServiceContainerLoaderFileYaml }

# Now working with :

imports:
  default: { resource: default.yml, class: sfServiceContainerLoaderFileYaml }

It's fixed.. but you might want to look into what is causing it, I'm not sure if that syntax was valid or where we took it from exactly..

02/23/10 14:36:29 changed by fabien

That's definitely a bug from the patch. I will have a look at it and revert if it cannot be fixed easily.

02/23/10 14:36:34 changed by fabien

  • status changed from closed to reopened.
  • resolution deleted.

02/23/10 14:38:29 changed by fabien

ok, I have found a fix. I now need to see which syntax is valid and which one is not. Expect a fix later today.

02/23/10 14:46:55 changed by Seldaek

Ok great thanks.

02/23/10 14:49:18 changed by fabien

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [28213]) [YAML] fixed compact notation when there is an inlined hash (closes #8082)

03/24/10 14:55:41 changed by fabien

(In [28761]) [YAML] added support for compact inline notation with immediate sub mapping (refs #8082)