<p dir="auto">By following the upgrade to 2.7 documentation, I'm changing <code class="notranslate">choice</code> options.</p>
<p dir="auto">With the given form:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-&gt;add('environment', 'choice', [
    'choices'       =&gt; [
        'production'    =&gt; 'Production',
        'beta'          =&gt; 'Beta',
        'development'   =&gt; 'Development',
        'binpkg'        =&gt; 'BinPkg',
    ],
])"><pre class="notranslate">-&gt;add(<span class="pl-s">'environment'</span>, <span class="pl-s">'choice'</span>, [
    <span class="pl-s">'choices'</span>       =&gt; [
        <span class="pl-s">'production'</span>    =&gt; <span class="pl-s">'Production'</span>,
        <span class="pl-s">'beta'</span>          =&gt; <span class="pl-s">'Beta'</span>,
        <span class="pl-s">'development'</span>   =&gt; <span class="pl-s">'Development'</span>,
        <span class="pl-s">'binpkg'</span>        =&gt; <span class="pl-s">'BinPkg'</span>,
    ],
])</pre></div>
<p dir="auto">We get this output:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;select&gt;
    &lt;option value=&quot;&quot;&gt;&lt;/option&gt;
    &lt;option value=&quot;production&quot;&gt;Production&lt;/option&gt;
    &lt;option value=&quot;beta&quot;&gt;Beta&lt;/option&gt;
    &lt;option value=&quot;development&quot;&gt;Development&lt;/option&gt;
    &lt;option value=&quot;binpkg&quot;&gt;BinPkg&lt;/option&gt;
&lt;/select&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>=""<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">production</span>"<span class="pl-kos">&gt;</span>Production<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">beta</span>"<span class="pl-kos">&gt;</span>Beta<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">development</span>"<span class="pl-kos">&gt;</span>Development<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">binpkg</span>"<span class="pl-kos">&gt;</span>BinPkg<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">If I try to reverse choices and use <code class="notranslate">choices_as_value</code> option:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-&gt;add('environment', 'choice', [
    'choices'       =&gt; [
        'Production'    =&gt; 'production',
        'Beta'          =&gt; 'beta',
        'Development'   =&gt; 'development',
        'BinPkg'        =&gt; 'binpkg',
    ],
    'choices_as_values' =&gt; true,
])"><pre class="notranslate">-&gt;add(<span class="pl-s">'environment'</span>, <span class="pl-s">'choice'</span>, [
    <span class="pl-s">'choices'</span>       =&gt; [
        <span class="pl-s">'Production'</span>    =&gt; <span class="pl-s">'production'</span>,
        <span class="pl-s">'Beta'</span>          =&gt; <span class="pl-s">'beta'</span>,
        <span class="pl-s">'Development'</span>   =&gt; <span class="pl-s">'development'</span>,
        <span class="pl-s">'BinPkg'</span>        =&gt; <span class="pl-s">'binpkg'</span>,
    ],
    <span class="pl-s">'choices_as_values'</span> =&gt; <span class="pl-c1">true</span>,
])</pre></div>
<p dir="auto">I got this:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;select&gt;
    &lt;option value=&quot;&quot;&gt;&lt;/option&gt;
    &lt;option value=&quot;0&quot;&gt;Production&lt;/option&gt;
    &lt;option value=&quot;1&quot;&gt;Beta&lt;/option&gt;
    &lt;option value=&quot;2&quot;&gt;Development&lt;/option&gt;
    &lt;option value=&quot;3&quot;&gt;BinPkg&lt;/option&gt;
&lt;/select&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>=""<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">0</span>"<span class="pl-kos">&gt;</span>Production<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">1</span>"<span class="pl-kos">&gt;</span>Beta<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">2</span>"<span class="pl-kos">&gt;</span>Development<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">3</span>"<span class="pl-kos">&gt;</span>BinPkg<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">As you can see, my associated array keys are simply ignored and replaced by numeric values.</p>
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>no</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.8.11</td>
</tr>
</tbody>
</table>
<p dir="auto">If my application has multiple firewalls with some of them using the same user provider; they will be added to the AuthenticationProviderManager as unique authentication providers.</p>
<p dir="auto">Is this intended behavior c.q. is there a use case I'm overlooking?</p>
<p dir="auto">I would expect them to be deduplicated somewhere during the configuration compilation.</p>