<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes (documentation)</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>all</td>
</tr>
</tbody>
</table>
<p dir="auto">Hello,<br>
I'm digging through Symfony's Security components trying to implement a custom security bundle, and I really miss one thing: The Big Picture. There is a lot written about individual components and even source code is quite understandable, but there is nothing about how these components work together.</p>
<p dir="auto">The workflow diagrams in <a href="http://symfony.com/doc/current/components/http_kernel.html" rel="nofollow">HttpKernel documentation</a> are extremely helpful. There should be similar diagrams included in <a href="https://symfony.com/doc/current/components/security.html" rel="nofollow">Security component documentation</a>. How all these components interact with each other? What happens during ordinary HTTP request? What happens during login? What happens during subsequent HTTP requests? …? …?</p>
<p dir="auto">The documentation says there are some components (Guards missing, btw) and that's it. No relation between them is provided. No context. Nothing about basic principles nor ideas.</p>
<p dir="auto">Security is important and must be well understood to make it right. A cookbook without context is not enough — it helps when one understands, but does not make him understand. Symfony Security component is powerful and complex, so it is hard to get into it.</p>
<p dir="auto">Someone who has deep understanding of the Security component, please, draw few diagrams how it works. It will help many other developers.</p>
<p dir="auto">If write following config:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="        &lt;service id=&quot;service&quot; alias=&quot;service_alias&quot;/&gt;
        &lt;service id=&quot;sevice_alias&quot; alias=&quot;service&quot;/&gt;"><pre class="notranslate">        &lt;<span class="pl-ent">service</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>service<span class="pl-pds">"</span></span> <span class="pl-e">alias</span>=<span class="pl-s"><span class="pl-pds">"</span>service_alias<span class="pl-pds">"</span></span>/&gt;
        &lt;<span class="pl-ent">service</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>sevice_alias<span class="pl-pds">"</span></span> <span class="pl-e">alias</span>=<span class="pl-s"><span class="pl-pds">"</span>service<span class="pl-pds">"</span></span>/&gt;</pre></div>
<p dir="auto">Infinite loop will occur in the ResolveReferencesToAliasesPass class. Think such circular references should be catched and an exception should occur instead of falling into infinite loop.</p>