<p dir="auto">Hi,</p>
<p dir="auto">im using Yaml Component in a project,<br>
but when I dump a array into a YAML,<br>
it returns something like this:<br>
Yaml::dump()</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test:
    value: &quot;1 \r\n 2 \r\n 3&quot;"><pre class="notranslate">test:
    value: <span class="pl-s">"1 \r\n 2 \r\n 3"</span></pre></div>
<p dir="auto">and I need something like this:<br>
Yaml::dump()</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test:
    value: |
        1
        2
        3"><pre class="notranslate">test:
    <span class="pl-s1">value</span>: <span class="pl-c1">|</span>
        <span class="pl-c1">1</span>
        <span class="pl-c1">2</span>
        <span class="pl-c1">3</span></pre></div>
<p dir="auto">This is the original array:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Array(
    &quot;teste&quot; =&gt; Array(
        &quot;value&quot; =&gt; &quot;1
2
3&quot;
    )
)"><pre class="notranslate"><span class="pl-en">Array</span>(
    "<span class="pl-s">teste</span>" =&gt; <span class="pl-en">Array</span>(
        "<span class="pl-s">value</span>" =&gt; "<span class="pl-s">1</span>
<span class="pl-s">2</span>
<span class="pl-s">3</span>"
    )
)</pre></div>
<p dir="auto">Its is possible?</p>
<p dir="auto">In a Controller, I have two actions :</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    /**
     * @Route(&quot;/search&quot;, name=&quot;search_with_default&quot;, defaults={&quot;p&quot;=1})
     */
    public function searchWithDefaultAction(Request $request)
    {
        return $this-&gt;render('default/index.html.twig');
    }

    /**
     * @Route(&quot;/search&quot;, name=&quot;search_without_default&quot;)
     */
    public function searchWithoutDefaultAction(Request $request)
    {
        return $this-&gt;render('default/index.html.twig');
    }"><pre class="notranslate">    <span class="pl-c">/**</span>
<span class="pl-c">     * @Route("/search", name="search_with_default", defaults={"p"=1})</span>
<span class="pl-c">     */</span>
    <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">searchWithDefaultAction</span>(<span class="pl-smi"><span class="pl-smi">Request</span></span> <span class="pl-s1"><span class="pl-c1">$</span>request</span>)
    {
        <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">render</span>(<span class="pl-s">'default/index.html.twig'</span>);
    }

    <span class="pl-c">/**</span>
<span class="pl-c">     * @Route("/search", name="search_without_default")</span>
<span class="pl-c">     */</span>
    <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">searchWithoutDefaultAction</span>(<span class="pl-smi"><span class="pl-smi">Request</span></span> <span class="pl-s1"><span class="pl-c1">$</span>request</span>)
    {
        <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">render</span>(<span class="pl-s">'default/index.html.twig'</span>);
    }</pre></div>
<p dir="auto">In twig, I generate routes to these actions with an additional GET parameter 'p' :</p>
<div class="highlight highlight-text-html-twig notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    {{ path('search_with_default',{'p':2}) }}&lt;br/&gt;
    {{ path('search_without_default',{'p':2}) }}"><pre class="notranslate">    {{ path(<span class="pl-s"><span class="pl-pds">'</span>search_with_default<span class="pl-pds">'</span></span>,{<span class="pl-s"><span class="pl-pds">'</span>p<span class="pl-pds">'</span></span>:<span class="pl-c1">2</span>}) }}&lt;<span class="pl-ent">br</span>/&gt;
    {{ path(<span class="pl-s"><span class="pl-pds">'</span>search_without_default<span class="pl-pds">'</span></span>,{<span class="pl-s"><span class="pl-pds">'</span>p<span class="pl-pds">'</span></span>:<span class="pl-c1">2</span>}) }}</pre></div>
<p dir="auto">Result :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/app_dev.php/search
/app_dev.php/search?p=2 "><pre class="notranslate"><code class="notranslate">/app_dev.php/search
/app_dev.php/search?p=2 
</code></pre></div>
<p dir="auto">The first one, totally ignore the value assigned on 'p'.</p>
<p dir="auto">Bug reproduced here :</p>
<p dir="auto"><a href="https://github.com/Alsatian67/symfony-standard">https://github.com/Alsatian67/symfony-standard</a></p>
<p dir="auto">(index page shows the two paths)</p>