<p dir="auto">It would be nice to allow the generation of routes from an object (just like the symfony1 times)</p>
<p dir="auto">So instead of this:<br>
<code class="notranslate">{{ path('product_show', {'id': product.id, 'slug': product.slug}) }}</code><br>
We can do this:<br>
<code class="notranslate">{{ path('product_show', product) }}</code></p>
<p dir="auto">For more information check this <a href="http://stackoverflow.com/questions/8877806/symfony2-use-object-to-set-route-parameters" rel="nofollow">stackoverflow question</a>, and this <a href="https://gist.github.com/stevelacey/3226510">gist</a></p>
<p dir="auto">For Symfony2 Router with the help of standart bundle (sensio extra) we can write ParamConverters to convert request param=&gt;object. Is there any standart way to use reversed convertion?</p>
<p dir="auto">Now we must do something like this:<br>
path('DevBlogBundle_post_show',{'post':post.id})<br>
While a better way would be:<br>
path('DevBlogBundle_post_show',{'post':post})</p>
<p dir="auto">I've found even example jist:<br>
<a href="https://gist.github.com/stevelacey/3226510">https://gist.github.com/stevelacey/3226510</a></p>
<ol dir="auto">
<li>Maybe, we should think about adding such functionality to future releases of, for example, sensioFrameworkExtra bundle?</li>
<li>If there is no such functionality, is bundle providing such extension would be needed?</li>
</ol>
<p dir="auto">Thanks.</p>