Closed
Description
Symfony version(s) affected: 3.x/4.x
Description
When you use a mapping key in a multi-line string, that value is mistakenly treated as part of the string while it should lead to a parser error instead.
How to reproduce
use Symfony\Component\Yaml\Yaml;
$yaml = <<<EOT
doctrine:
dbal:yeah
default_connection: monolith
EOT;
print_r(Yaml::parse($yaml));
ends up in this result:
Array
(
[doctrine] => dbal:yeah default_connection: monolith
)