<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>2.7</td>
</tr>
</tbody>
</table>
<p dir="auto">Fabien added <a href="https://github.com/symfony/symfony/pull/21210#issuecomment-271297002" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/21210/hovercard">this comment</a> about this bug:</p>
<blockquote>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="179024195" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/20044" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/20044/hovercard" href="https://github.com/symfony/symfony/issues/20044">#20044</a> this is a bug on Console that should be fixed, when passing --prefix="", the prefix should be empty.</p>
</blockquote>
<p dir="auto">Forgive me if this is a known issue or is due to misconfiguration.</p>
<p dir="auto">I have two configuration files, config_test.yml and config.yml. The first one imports the second, so I expect all values in config_test.yml to override config.yml. However, in my bundle extension class where I am processing the bundle configuration, I am seeing some strange behaviour. Below is the portion of the config that I am having problems with in both YML files...</p>
<p dir="auto">config_test.yml:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="tickit_cache:
    default_namespace: &quot;tickit.test&quot;
    types:
        memcached:
            servers:
                main:
                    host: test.local
                    port: ~
                    weight: 2
                    retry_time: 5
                    enabled: true
                alternate:
                    host: test.local
                    port: ~
                    weight: 1
                    retry_time: 10
                    enabled: true"><pre class="notranslate"><span class="pl-ent">tickit_cache</span>:
    <span class="pl-ent">default_namespace</span>: <span class="pl-s"><span class="pl-pds">"</span>tickit.test<span class="pl-pds">"</span></span>
    <span class="pl-ent">types</span>:
        <span class="pl-ent">memcached</span>:
            <span class="pl-ent">servers</span>:
                <span class="pl-ent">main</span>:
                    <span class="pl-ent">host</span>: <span class="pl-s">test.local</span>
                    <span class="pl-ent">port</span>: <span class="pl-c1">~</span>
                    <span class="pl-ent">weight</span>: <span class="pl-c1">2</span>
                    <span class="pl-ent">retry_time</span>: <span class="pl-c1">5</span>
                    <span class="pl-ent">enabled</span>: <span class="pl-c1">true</span>
                <span class="pl-ent">alternate</span>:
                    <span class="pl-ent">host</span>: <span class="pl-s">test.local</span>
                    <span class="pl-ent">port</span>: <span class="pl-c1">~</span>
                    <span class="pl-ent">weight</span>: <span class="pl-c1">1</span>
                    <span class="pl-ent">retry_time</span>: <span class="pl-c1">10</span>
                    <span class="pl-ent">enabled</span>: <span class="pl-c1">true</span></pre></div>
<p dir="auto">config.yml:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="tickit_cache:
    default_namespace: &quot;tickit&quot;
    types:
        memcached:
            servers:
                main:
                    host: localhost
                    port: ~
                    weight: 2
                    retry_time: 5
                    enabled: true
                alternate:
                    host: localhost
                    port: ~
                    weight: 1
                    retry_time: 10
                    enabled: true"><pre class="notranslate"><span class="pl-ent">tickit_cache</span>:
    <span class="pl-ent">default_namespace</span>: <span class="pl-s"><span class="pl-pds">"</span>tickit<span class="pl-pds">"</span></span>
    <span class="pl-ent">types</span>:
        <span class="pl-ent">memcached</span>:
            <span class="pl-ent">servers</span>:
                <span class="pl-ent">main</span>:
                    <span class="pl-ent">host</span>: <span class="pl-s">localhost</span>
                    <span class="pl-ent">port</span>: <span class="pl-c1">~</span>
                    <span class="pl-ent">weight</span>: <span class="pl-c1">2</span>
                    <span class="pl-ent">retry_time</span>: <span class="pl-c1">5</span>
                    <span class="pl-ent">enabled</span>: <span class="pl-c1">true</span>
                <span class="pl-ent">alternate</span>:
                    <span class="pl-ent">host</span>: <span class="pl-s">localhost</span>
                    <span class="pl-ent">port</span>: <span class="pl-c1">~</span>
                    <span class="pl-ent">weight</span>: <span class="pl-c1">1</span>
                    <span class="pl-ent">retry_time</span>: <span class="pl-c1">10</span>
                    <span class="pl-ent">enabled</span>: <span class="pl-c1">true</span></pre></div>
<p dir="auto">After these are processed by <code class="notranslate">Symfony\Component\Config\Definition\Processor</code> I expect to see something like this...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Array
(
    [default_namespace] =&gt; tickit.test
    [types] =&gt; Array
        (
            [memcached] =&gt; Array
                (
                    [servers] =&gt; Array
                        (
                            [main] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 2
                                    [retry_time] =&gt; 5
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [alternate] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 1
                                    [retry_time] =&gt; 10
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )
                        )
                )
        )
);"><pre class="notranslate"><code class="notranslate">Array
(
    [default_namespace] =&gt; tickit.test
    [types] =&gt; Array
        (
            [memcached] =&gt; Array
                (
                    [servers] =&gt; Array
                        (
                            [main] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 2
                                    [retry_time] =&gt; 5
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [alternate] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 1
                                    [retry_time] =&gt; 10
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )
                        )
                )
        )
);
</code></pre></div>
<p dir="auto">Instead, the "servers" portion of the configuration is being duplicated and I receive something like this...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Array
(
    [default_namespace] =&gt; tickit.test
    [types] =&gt; Array
        (
            [memcached] =&gt; Array
                (
                    [servers] =&gt; Array
                        (
                            [main] =&gt; Array
                                (
                                    [host] =&gt; localhost
                                    [port] =&gt; 
                                    [weight] =&gt; 2
                                    [retry_time] =&gt; 5
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [alternate] =&gt; Array
                                (
                                    [host] =&gt; localhost
                                    [port] =&gt; 
                                    [weight] =&gt; 1
                                    [retry_time] =&gt; 10
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [0] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 2
                                    [retry_time] =&gt; 5
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [1] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 1
                                    [retry_time] =&gt; 10
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )
                        )
                )
        )
);"><pre class="notranslate"><code class="notranslate">Array
(
    [default_namespace] =&gt; tickit.test
    [types] =&gt; Array
        (
            [memcached] =&gt; Array
                (
                    [servers] =&gt; Array
                        (
                            [main] =&gt; Array
                                (
                                    [host] =&gt; localhost
                                    [port] =&gt; 
                                    [weight] =&gt; 2
                                    [retry_time] =&gt; 5
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [alternate] =&gt; Array
                                (
                                    [host] =&gt; localhost
                                    [port] =&gt; 
                                    [weight] =&gt; 1
                                    [retry_time] =&gt; 10
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [0] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 2
                                    [retry_time] =&gt; 5
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )

                            [1] =&gt; Array
                                (
                                    [host] =&gt; test.local
                                    [port] =&gt; 
                                    [weight] =&gt; 1
                                    [retry_time] =&gt; 10
                                    [enabled] =&gt; 1
                                    [persistent] =&gt; 1
                                )
                        )
                )
        )
);
</code></pre></div>
<p dir="auto">The "default_namespace" is correctly using the value from config_test.yml, but the "servers" array is being duplicated instead of using just config_test.yml values.</p>
<p dir="auto">For reference, here is my tree builder logic:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$builder-&gt;root('tickit_cache')
            -&gt;addDefaultsIfNotSet()
            -&gt;children()
                -&gt;scalarNode('default_namespace')-&gt;defaultValue('tickit_cache')-&gt;end()
                -&gt;arrayNode('types')
                    -&gt;children()
                        -&gt;arrayNode('memcached')-&gt;addDefaultsIfNotSet()
                            -&gt;children()
                                -&gt;arrayNode('servers')
                                    -&gt;prototype('array')
                                        -&gt;children()
                                            -&gt;scalarNode('host')-&gt;end()
                                            -&gt;scalarNode('port')-&gt;end()
                                            -&gt;booleanNode('persistent')-&gt;defaultValue(true)-&gt;end()
                                            -&gt;scalarNode('weight')-&gt;defaultValue(1)-&gt;end()
                                            -&gt;scalarNode('retry_time')-&gt;defaultValue(10)-&gt;end()
                                            -&gt;booleanNode('enabled')-&gt;defaultValue(true)-&gt;end()
                                        -&gt;end()
                                    -&gt;end()
                                -&gt;end()
                            -&gt;end()
                        -&gt;end()
                    -&gt;end()
                -&gt;end()
            -&gt;end();"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>builder</span>-&gt;<span class="pl-en">root</span>(<span class="pl-s">'tickit_cache'</span>)
            -&gt;<span class="pl-en">addDefaultsIfNotSet</span>()
            -&gt;<span class="pl-en">children</span>()
                -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'default_namespace'</span>)-&gt;<span class="pl-en">defaultValue</span>(<span class="pl-s">'tickit_cache'</span>)-&gt;<span class="pl-en">end</span>()
                -&gt;<span class="pl-en">arrayNode</span>(<span class="pl-s">'types'</span>)
                    -&gt;<span class="pl-en">children</span>()
                        -&gt;<span class="pl-en">arrayNode</span>(<span class="pl-s">'memcached'</span>)-&gt;<span class="pl-en">addDefaultsIfNotSet</span>()
                            -&gt;<span class="pl-en">children</span>()
                                -&gt;<span class="pl-en">arrayNode</span>(<span class="pl-s">'servers'</span>)
                                    -&gt;<span class="pl-en">prototype</span>(<span class="pl-s">'array'</span>)
                                        -&gt;<span class="pl-en">children</span>()
                                            -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'host'</span>)-&gt;<span class="pl-en">end</span>()
                                            -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'port'</span>)-&gt;<span class="pl-en">end</span>()
                                            -&gt;<span class="pl-en">booleanNode</span>(<span class="pl-s">'persistent'</span>)-&gt;<span class="pl-en">defaultValue</span>(<span class="pl-c1">true</span>)-&gt;<span class="pl-en">end</span>()
                                            -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'weight'</span>)-&gt;<span class="pl-en">defaultValue</span>(<span class="pl-c1">1</span>)-&gt;<span class="pl-en">end</span>()
                                            -&gt;<span class="pl-en">scalarNode</span>(<span class="pl-s">'retry_time'</span>)-&gt;<span class="pl-en">defaultValue</span>(<span class="pl-c1">10</span>)-&gt;<span class="pl-en">end</span>()
                                            -&gt;<span class="pl-en">booleanNode</span>(<span class="pl-s">'enabled'</span>)-&gt;<span class="pl-en">defaultValue</span>(<span class="pl-c1">true</span>)-&gt;<span class="pl-en">end</span>()
                                        -&gt;<span class="pl-en">end</span>()
                                    -&gt;<span class="pl-en">end</span>()
                                -&gt;<span class="pl-en">end</span>()
                            -&gt;<span class="pl-en">end</span>()
                        -&gt;<span class="pl-en">end</span>()
                    -&gt;<span class="pl-en">end</span>()
                -&gt;<span class="pl-en">end</span>()
            -&gt;<span class="pl-en">end</span>();</pre></div>