8000 Yaml parser incorrectly parses some yaml block sequences · Issue #40438 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Yaml parser incorrectly parses some yaml block sequences #40438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andris-sevcenko opened this issue Mar 10, 2021 · 1 comment
Closed

Yaml parser incorrectly parses some yaml block sequences #40438

andris-sevcenko opened this issue Mar 10, 2021 · 1 comment

Comments

@andris-sevcenko
Copy link

Symfony version(s) affected: 5.x-dev

Description
Symfony Yaml parser incorrectly parses some block sequences.
In particular, if using this test data, the output produced is

[
  "- s1_i1 - s1_i2",
  "s2"
]

which is not the expected output as per the test.

How to reproduce

<?php
require_once '../vendor/autoload.php';

$yaml = <<<Y
- - s1_i1
  - s1_i2
- s2
Y;


echo(json_encode(\Symfony\Component\Yaml\Yaml::parse($yaml)));

Additional context
Related issues:

@xabbuh
Copy link
Member
xabbuh commented Mar 10, 2021

Status: Reviewed

nicolas-grekas added a commit that referenced this issue Apr 1, 2021
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix parsing some block sequences

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40438
| License       | MIT
| Doc PR        |

Commits
-------

31b0472 fixed parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0