Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.3.14 |
Given:
$yaml = <<<YAML
array:
- option:
# A comment
value: 'a value'
YAML;
dump(\Symfony\Component\Yaml\Yaml::parse($yaml));
I get:
[Symfony\Component\Yaml\Exception\ParseException]
Unable to parse at line 4 (near " value: 'a value'").
I got this error just after upgrading from Symfony 3.3.13 to 3.3.14 inside my httplug config section. I followed instructions in its documentation example in http://docs.php-http.org/en/latest/integrations/symfony-bundle.html#plugins and added a comment just between - add_host:
and host:
(the docs have some lines with 8 spaces as indentation, I've used both 8 and 4 just in case but made no difference). If I remove the comment it works fine for both versions 3.3.13 and 3.3.14.