Skip to content


Subversion checkout URL

You can clone with
Download ZIP


[Component][Yaml] unindented collection - failing test #4226

wants to merge 1 commit into from

3 participants


According to we have another bug in Yaml component.

The commit contains test for this case. The test is currently failing.

I will work on it, but I need some confirmation about Yaml syntax.

Should the output of parsing following Yaml:

- a
    - b
        - c


array('collection' => array("a - b - c"))

This pull request fails (merged 38c403d into e54f4e4).


I think this syntax does not make sense and as such I don't see the need to support it.


I wanted to avoid unnecessary effort. I've checked other Yaml implementations - all of them comply with the above test. Thus I think we should regard it as an error. But I agree with you: it is unnecessary.

Thanks for your opinion.

@fabpot fabpot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 8, 2012
  1. @gajdaw
This page is out of date. Refresh to see the latest.
17 src/Symfony/Component/Yaml/Tests/Fixtures/unindentedCollections.yml
@@ -60,3 +60,20 @@ yaml: |
foo: bar
php: |
array('collection' => array('key' => array('a', 'b', 'c'), 'foo' => 'bar'))
+test: Unindented collection with faux elements
+brief: >
+ Unindented collection with faux elements
+yaml: |
+ collection:
+ - a
+ - b
+ - c
+php: |
+ array('collection' => array("a - b - c"))
Something went wrong with that request. Please try again.