<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>no</td>
</tr>
<tr>
<td>Feature request?</td>
<td>yes</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>-</td>
</tr>
<tr>
<td>RFC?</td>
<td>-</td>
</tr>
<tr>
<td>Symfony version</td>
<td>-</td>
</tr>
</tbody>
</table>
<p dir="auto">Hello,</p>
<p dir="auto">I'm constantly wondering myself which Interface are picked up by the container to add service tag automatically when you use <code class="notranslate">autoconfigure: true</code> config.</p>
<p dir="auto">The <a href="http://symfony.com/doc/current/service_container/tags.html#autoconfiguring-tags" rel="nofollow">documentations</a> mentions the <code class="notranslate">Twig_ExtensionInterface</code> Interface, but It would be awesome to <strong>have a command that tells us all the interfaces and classes that will apply a tag to my autoconfigured service</strong>.</p>
<p dir="auto">ex: <code class="notranslate">bin/console debug:autotags</code> &lt;--- not a good name, but <g-emoji class="g-emoji" alias="sweat_smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f605.png">😅</g-emoji></p>
<p dir="auto">PS: Is this already possible to know that (even without a command) ? If so I'd like to know how.</p>
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>no</td>
</tr>
<tr>
<td>Feature request?</td>
<td>yes</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>yes</td>
</tr>
<tr>
<td>Symfony version</td>
<td>4.1</td>
</tr>
</tbody>
</table>
<p dir="auto">Inspired by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="295672425" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony-docs/issues/9229" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony-docs/issues/9229/hovercard" href="https://github.com/symfony/symfony-docs/issues/9229">symfony/symfony-docs#9229</a>.</p>
<p dir="auto">I've been wondering why there's no list available showing the tags that are applied on certain classes through autoconfiguration. I know it's just a small detail but I wanted to raise the issue nonetheless, autoconfiguration might be optional but so is autowiring.</p>
<p dir="auto">I've checked out <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php">https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php</a>, and I can see why it hasn't been added before. The command compiles the container from cache, but the container dump doesn't contain the information anymore about which classes have been wired through autoconfiguration.</p>
<p dir="auto">It would be mainly used <del>for debugging purposes and</del> just to show the developer what types of services they can wire through autoconfiguration. It could be called something like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="debug:container --interfaces"><pre class="notranslate"><code class="notranslate">debug:container --interfaces
</code></pre></div>
<p dir="auto">and explained as</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Displays autoconfiguration interfaces for an application"><pre class="notranslate"><code class="notranslate">Displays autoconfiguration interfaces for an application
</code></pre></div>
<p dir="auto">What do you think?</p>