<p dir="auto">When you pass doctrine proxy object to twig render function e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{{ render(controller('ExampleBundle:Example:index', {'item', md.item})) }}"><pre class="notranslate"><code class="notranslate">{{ render(controller('ExampleBundle:Example:index', {'item', md.item})) }}
</code></pre></div>
<p dir="auto">where "md" is entity with property "item" that represent object of many to one relationship, render function converts proxy object to array and "indexAction" of "ExampleController" gets that array instead of proxy object and you lose all access to getters and setters.</p>
<p dir="auto">See this issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11151934" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/7122" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/7122/hovercard" href="https://github.com/symfony/symfony/issues/7122">#7122</a>;</p>
<p dir="auto">Personally I think it should be supported by default, only having to specify locale to override.</p>
<p dir="auto">For example if I have routes:</p>
<p dir="auto">/contact<br>
/about</p>
<p dir="auto">/fr/contact<br>
/fr/about</p>
<p dir="auto">on /fr/about I have a path:</p>
<p dir="auto">{{ path('contact') }}</p>
<p dir="auto">Why would that create a path for /contact by default instead of /fr/contact ?</p>
<p dir="auto">From what I understand to create what should be default behavior on a per link basis, I must:</p>
<p dir="auto">{{ path('address', {'_locale': app.request.attributes.get('_locale')}) }}</p>
<p dir="auto">Any plans to amend this?</p>