<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>dunno</td>
</tr>
</tbody>
</table>

<p dir="auto">A lot of new features related to the auto-wiring have been added recently:</p>
<ul dir="auto">
<li>Autowiring</li>
<li>Setter auto-wiring</li>
<li>Getter auto-wiring</li>
</ul>
<p dir="auto">IMO, especially with the last two, it starts to become necessary to have more tooling to debug auto-wiring. For example, I am a developer coming onto an existing Symfony project which make moderate or heavy use of the auto-wiring feature. Regardless of if the usage of this feature has been done wisely or not, in that situation, I should be able to easily tell what services is auto-wired and its surrounding effects (e.g. if <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="197366294" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/21031" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/21031/hovercard" href="https://github.com/symfony/symfony/pull/21031">#21031</a>: what other services are auto-wired?).</p>
<p dir="auto">I have in mind a command to list all the auto-wired services with eventually details on which level of auto-wiring is used. But maybe someone has a better or other suggestions in mind?</p>
<p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nicolas-grekas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nicolas-grekas">@nicolas-grekas</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dunglas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dunglas">@dunglas</a></p>
<p dir="auto">As specified in the <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php">AuthenticationManagerInterface</a>, any implementation of <code class="notranslate">AuthenticationManagerInterface::authenticate</code> should always return a TokenInterface.  Some provided implementation do not follow the rule, examples are</p>
<ul dir="auto">
<li><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php#L43"><code class="notranslate">AnonymousAuthenticationProvider</code></a></li>
<li><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php#L56"><code class="notranslate">PreAuthenticatedAuthenticationProvider</code></a></li>
<li><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php#L45"><code class="notranslate">RememberMeAuthenticationProvider</code></a></li>
<li><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php#L61"><code class="notranslate">UserAuthenticationProvider</code></a></li>
</ul>
<p dir="auto">In addition, the <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php#L34"><code class="notranslate">AuthenticationProviderInterface::supports</code></a> is not really an interface public method, just like the <code class="notranslate">supports*</code> method from <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php"><code class="notranslate">VoterInterface</code></a> are never used by caller classes.  These method are solely used <em>as if</em> they where protected helper functions.</p>
<p dir="auto">These issues are not critical but may induce unexpected behaviour.  Fixing them may end in some BC break.  Any opinion ?</p>