<p dir="auto">The duplicated code in <code class="notranslate">FormHelper</code> (FrameworkBundle) and <code class="notranslate">FormExtension</code> (Twig bridge) should be extracted into a common base class <code class="notranslate">Symfony\Component\Form\AbstractRenderer</code>. It's interface should be extracted into a new <code class="notranslate">Symfony\Component\Form\FormRendererInterface</code> (containing the render*() methods of FormExtension).</p>
<p dir="auto">The engine specific code should be placed in <code class="notranslate">TwigRenderer</code> (Twig bridge) and <code class="notranslate">TemplatingRenderer</code> (FrameworkBundle). <code class="notranslate">FormHelper</code> and <code class="notranslate">FormExtension</code> can then simply create such a renderer object and forward any method calls to the renderer.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fabpot/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fabpot">@fabpot</a>: Is the Templating component already able to load templates from components? If yes, we should definitely move <code class="notranslate">FormHelper</code>, <code class="notranslate">TemplatingRenderer</code> and the PHP templates to the Form (or Templating) component to make it self-contained (and usable without FrameworkBundle).</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vicb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vicb">@vicb</a>: Can you do this?</p>
<p dir="auto"><code class="notranslate">bind</code>ing partial parameters effectively clears all existing values from the model and only persists the new parameters that are passed in.  See example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Author.php
class Author
{
    public $name;
    public $email = 'bar';
}

// AuthorType
...
$builder-&gt;add('name', 'text')-&gt;author('text');
..."><pre class="notranslate"><code class="notranslate">// Author.php
class Author
{
    public $name;
    public $email = 'bar';
}

// AuthorType
...
$builder-&gt;add('name', 'text')-&gt;author('text');
...
</code></pre></div>
<p dir="auto">Passing <code class="notranslate">$form-&gt;bind(array('name' =&gt; 'foo'))</code> wipes out the existing <code class="notranslate">email</code> value.</p>