<p dir="auto">I've encountered the structure below in the wild. Although I don't know whether it's valid Yaml, Ruby's parser and the Yaml PECL extension allow it.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    test: &quot;Probably not the right
           way to wrap a string,
           but it parses with Ruby
           and the PECL extension.&quot;"><pre class="notranslate">    <span class="pl-ent">test</span>: <span class="pl-s"><span class="pl-pds">"</span>Probably not the right</span>
<span class="pl-s">           way to wrap a string,</span>
<span class="pl-s">           but it parses with Ruby</span>
<span class="pl-s">           and the PECL extension.<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">I get a parse error "Malformed inline YAML string"</p>
<p dir="auto">The <a href="http://yaml.org/spec/current.html#id2503731" rel="nofollow">YAML specification has the following example</a> for a multi line message in double quotes:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="quoted: &quot;So does this
  quoted scalar.\n&quot;"><pre class="notranslate"><span class="pl-ent">quoted</span>: <span class="pl-s"><span class="pl-pds">"</span>So does this</span>
<span class="pl-s">  quoted scalar.<span class="pl-cce">\n</span><span class="pl-pds">"</span></span></pre></div>
<p dir="auto">Write that in a MultilineDoubleQuotedMessage.yml and try to Yaml::parse('MultilineDoubleQuotedMessage.yml') - Symfony will throw an exception like this:</p>
<blockquote>
<p dir="auto">Malformed inline YAML string ("So does this) in .../MultilineDoubleQuotedMessage.yml at line 1 (near "quoted: "So does this").</p>
<p dir="auto">in .../symfony/symfony/src/Symfony/Component/Yaml/Inline.php at line 244<br>
...</p>
</blockquote>
<p dir="auto">I tried that in Symfony 2.2.0 and 2.4.6, but the underlying issue seems to be the reg exp in <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Yaml/Inline.php#L246">https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Yaml/Inline.php#L246</a> , which lives on in Symfony 2.5.0.</p>
<p dir="auto">A unit test in Symfony\Component\Yaml\Tests\YamlTest could look something like this:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public function testParseAcceptsMultilineDoubleQuotedMessage()
{
    $filename = __DIR__ . '/Fixtures/MultilineDoubleQuotedMessage.yml';
    $this-&gt;setExpectedException(null);
    Yaml::parse($filename);
}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">testParseAcceptsMultilineDoubleQuotedMessage</span>()
{
    <span class="pl-s1"><span class="pl-c1">$</span>filename</span> = __DIR__ . <span class="pl-s">'/Fixtures/MultilineDoubleQuotedMessage.yml'</span>;
    <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">setExpectedException</span>(<span class="pl-c1">null</span>);
    <span class="pl-v">Yaml</span>::<span class="pl-en">parse</span>(<span class="pl-s1"><span class="pl-c1">$</span>filename</span>);
}</pre></div>