<p dir="auto">Would it be possible to utilize <code class="notranslate">APP_ENV</code> variable when running <code class="notranslate">yarn encore</code>?</p>
<p dir="auto">So instead of <code class="notranslate">yarn encore dev</code> or <code class="notranslate">yarn encore production</code> I would do <code class="notranslate">yarn encore</code>.</p>
<p dir="auto">More explicit option would be <code class="notranslate">yarn encore env</code> that selects dev or production based on <code class="notranslate">APP_ENV</code>.</p>
<p dir="auto">This would avoid duplication of install/deploy configurations between production and development.</p>
<p dir="auto">Rest of Symfony is doing that already.</p>
<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.1.1 (at least)</p>
<p dir="auto"><strong>Description</strong><br>
I tried to decorate the serializer, but it's not possible; I get an exception:</p>
<blockquote>
<p dir="auto">Circular reference detected for service "App\Serializer", path: "App\Serializer -&gt; App\Serializer.inner -&gt; App\Serializer".</p>
</blockquote>
<p dir="auto"><strong>How to reproduce</strong></p>
<p dir="auto">With a fresh website skeleton, add this commit: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/lyrixx/test/commit/f6e27f55d6ee946451e002f9a6938652ed56220b/hovercard" href="https://github.com/lyrixx/test/commit/f6e27f55d6ee946451e002f9a6938652ed56220b">lyrixx/test@<tt>f6e27f5</tt></a></p>
<p dir="auto">I tried to decorate the Router, in order to ensure the decoration system works as expected, and it works well. So I think there is something special with the serializer, but I don't know what :/</p>
<p dir="auto">Note: Actually, I don't need this at all, I found that while trying to help someone</p>