<p dir="auto">I'm trying to add attributes to my rendered radios</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$builder
    -&gt;add('myRadios', 'choice', array(
        'choices' =&gt; array(
            'one' =&gt; 'uno',
            'two' =&gt; 'due'),
        'multiple' =&gt; false,
        'attr' =&gt; array('class' =&gt; 'testClass'),
        'expanded' =&gt; true"><pre class="notranslate"><code class="notranslate">$builder
    -&gt;add('myRadios', 'choice', array(
        'choices' =&gt; array(
            'one' =&gt; 'uno',
            'two' =&gt; 'due'),
        'multiple' =&gt; false,
        'attr' =&gt; array('class' =&gt; 'testClass'),
        'expanded' =&gt; true
</code></pre></div>
<p dir="auto">the output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;div class=&quot;control-group&quot;&gt;
    &lt;label class=&quot;control-label required&quot;&gt;Myradios&lt;/label&gt;
    &lt;div class=&quot;controls&quot;&gt;
        &lt;label for=&quot;form_one_0&quot; class=&quot;required radio&quot;&gt;
            &lt;input type=&quot;radio&quot; id=&quot;form_one_0&quot; name=&quot;form[one]&quot; required=&quot;required&quot; value=&quot;uno&quot; /&gt;
            &lt;span&gt;Uno&lt;/span&gt;
        &lt;/label&gt;
        &lt;label for=&quot;form_two_1&quot; class=&quot;required radio&quot;&gt;
            &lt;input type=&quot;radio&quot; id=&quot;form_two_1&quot; name=&quot;form[two]&quot; required=&quot;required&quot; value=&quot;due&quot; /&gt;
            &lt;span&gt;Due&lt;/span&gt;
        &lt;/label&gt;
    &lt;/div&gt;
&lt;/div&gt;"><pre class="notranslate"><code class="notranslate">&lt;div class="control-group"&gt;
    &lt;label class="control-label required"&gt;Myradios&lt;/label&gt;
    &lt;div class="controls"&gt;
        &lt;label for="form_one_0" class="required radio"&gt;
            &lt;input type="radio" id="form_one_0" name="form[one]" required="required" value="uno" /&gt;
            &lt;span&gt;Uno&lt;/span&gt;
        &lt;/label&gt;
        &lt;label for="form_two_1" class="required radio"&gt;
            &lt;input type="radio" id="form_two_1" name="form[two]" required="required" value="due" /&gt;
            &lt;span&gt;Due&lt;/span&gt;
        &lt;/label&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre></div>
<p dir="auto">no references to class='testClass'</p>
<p dir="auto">I can't find any issue online</p>
<p dir="auto">It would be nice to be able to define extra HTML attributes for choices in a choice list that are added to the <code class="notranslate">option</code> or <code class="notranslate">input</code> tags.</p>
<p dir="auto">Origin of this ticket: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3393283" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/3456" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/3456/hovercard" href="https://github.com/symfony/symfony/issues/3456">#3456</a></p>