<p dir="auto">Description:</p>
<p dir="auto">When using bundle inheritance and template inheritance at the same time (where one of the child bundle's templates extends one of the parent bundle's templates), an error is thrown.</p>
<p dir="auto">Expected outcome:</p>
<p dir="auto">It should be possible to extend a parent bundle's template from a child bundle's template.</p>
<p dir="auto">How to reproduce:</p>
<p dir="auto"><a href="https://gist.github.com/4226370">https://gist.github.com/4226370</a></p>
<p dir="auto">Note that this happens with all values of xdebug.max_nesting_level and also with xdebug disabled (in this case the code keeps running until the process is out of memory).</p>
<p dir="auto">The following appear to be referencing the same issue, where a parent bundle's template is also being extended by a child bundle's template:</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="8131492" data-permission-text="Title is private" data-url="https://github.com/phiamo/MopaBootstrapBundle/issues/327" data-hovercard-type="issue" data-hovercard-url="/phiamo/MopaBootstrapBundle/issues/327/hovercard" href="https://github.com/phiamo/MopaBootstrapBundle/issues/327">phiamo/MopaBootstrapBundle#327</a><br>
<a href="http://stackoverflow.com/questions/11951379/maximum-function-nesting-when-extending-twig-template-for-sonata-admin" rel="nofollow">http://stackoverflow.com/questions/11951379/maximum-function-nesting-when-extending-twig-template-for-sonata-admin</a></p>
<p dir="auto">What do you think about creating an interface EventDispatcherAware, a trait EventDispatcherAwareTrait and maybe a tag too (event_dispatcher_aware) to inject automatically the EventDispatcher on services?</p>