<p dir="auto">When using the Apache router as described in the cookbook, an impact on the performance is noted when new routes are added without updating the Apache configuration.</p>
<p dir="auto">That is because routing information get loaded in every request for paths not matched by <code class="notranslate">ApacheUrlMatcher</code></p>
<p dir="auto">At the end of <code class="notranslate">ApacheUrlMatcher::match()</code> a call to parent::match() is done, but as there isn't a cache for routes, the routing loading is done in every request.</p>
<p dir="auto">Steps to reproduce:</p>
<ol dir="auto">
<li>Enable Apache router as described here: <a href="http://symfony.com/doc/current/cookbook/configuration/apache_router.html" rel="nofollow">http://symfony.com/doc/current/cookbook/configuration/apache_router.html</a></li>
<li>Add a new route/controller/action</li>
<li>Do not update the apache configuration (this is a desired step, as we do not wan't to have all routes in Apache, just some of then, and the others falling back to the default UrlMatcher.</li>
<li>Make a request to one of the routes not included in Apache config, note how the performance is impacted here as all the routing loading is executed in every request (in the prod environment).</li>
</ol>
<p dir="auto">The twig syntax <code class="notranslate">form.field.vars</code> is broken since beta3. I have a simple form:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="namespace Acme\DemoBundle\Model;

class Test
{
    private $url;

    public function getUrl()
    {
        return $this-&gt;url;
    }
}"><pre class="notranslate"><span class="pl-k">namespace</span> <span class="pl-v">Acme</span>\<span class="pl-v">DemoBundle</span>\<span class="pl-v">Model</span>;

<span class="pl-k">class</span> <span class="pl-v">Test</span>
{
    <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>url</span>;

    <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">getUrl</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-c1">url</span>;
    }
}</pre></div>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="namespace Acme\DemoBundle\Form;

class TestType extends AbstractType
{
    // etc
}"><pre class="notranslate"><span class="pl-k">namespace</span> <span class="pl-v">Acme</span>\<span class="pl-v">DemoBundle</span>\<span class="pl-v">Form</span>;

<span class="pl-k">class</span> <span class="pl-v">TestType</span> <span class="pl-k">extends</span> <span class="pl-v">AbstractType</span>
{
    <span class="pl-c">// etc</span>
}</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{% if form.url.vars.errors | length == 0 %}
{% endif %}"><pre class="notranslate"><code class="notranslate">{% if form.url.vars.errors | length == 0 %}
{% endif %}
</code></pre></div>
<p dir="auto">The above syntax generates the following error:</p>
<blockquote>
<p dir="auto">Notice: Undefined index: vars in symfony/src/Symfony/Component/Form/FormView.php line 308</p>
</blockquote>
<p dir="auto">I did some digging and it seems that <code class="notranslate">FormView</code> implements <code class="notranslate">ArrayAccess</code> which calls <code class="notranslate">offsetGet</code>, and that method returns <code class="notranslate">$this-&gt;children[$name]</code>. Is there another way to call <code class="notranslate">FormView-&gt;vars</code> in twig or is this a bug? I could of cource use <code class="notranslate">form.url.get('errors')</code> but that method is deprecated. The readme suggest using the public property <code class="notranslate">vars</code> but it's not possible to call it in a twig template?</p>