Hi Symfony Team,

I recently began doing some development using the Symfony 1.4
framework, which I have found to be very well designed and helpful.
However, I ran across a problem recently.
Please excuse me if I reached the wrong audience, as I'm unsure if
this is the proper channel to report issues/bugs:

There appears to be a missed implementation (or I may have simply
misunderstood the YAML specification), in sfYAML parser, dealing with
multi-lined Flow Sequence declarations. In essence, I'm trying to
define an array with:
---
[
        apple,
        orange,
]
...
As opposed to:
---
[ apple, orange]
...

The multi-line syntax is useful when the array/sequence gets large.
According to the YAML spec, example 7.14, the former seems to be an
allowed expression: http://www.yaml.org/spec/1.2/spec.html#id2790320

Also, another example, using the multiple-lined expression:
http://en.wikipedia.org/wiki/User:Baxter.brad/Drafts/YAML_Tutorial_and_Style_Guide#Flow_Sequences

However, when I use the sfYAML parser, rev. 32519,
http://svn.symfony-project.com/components/yaml/branches/1.0/lib, it
throws an expression.

After some digging, I found that the problem is caused by line 341,
sfYAMLParser.php, where "\n" is used as the implode glue:
return implode("\n", $data);

This can be fixed by replacing it with a condition check for the glue
character:
$glue = ( $data[0][0] == "[" || $data[0][0] == "{" ) ? "" : "\n";
return implode($glue, $data);

Given that I have very little experience with the Symfony framework,
can someone please kindly let me know if I had simply misunderstood
the issue?

Thank you for your time, and my gratitude and compliments for the
great work!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to