<p dir="auto">It doesn't matter what logic a class loader uses: it may load classes that follow a given naming convention or find them using name-path pairs. But it always does the same thing: loading classes. So, wouldn't it be better to have an <code class="notranslate">AbstractClassLoader</code> that all the loaders will have to extend? It will provide the final <code class="notranslate">register()</code> and <code class="notranslate">unregister()</code> methods, an abstract <code class="notranslate">findClass()</code> method and a default implementation of <code class="notranslate">loadClass()</code>.</p>
<p dir="auto">I can take the work if you think it's a good idea.</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>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>yes</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.2.6</td>
</tr>
</tbody>
</table>
<p dir="auto">BC break caused by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="202337064" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/21370" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/21370/hovercard" href="https://github.com/symfony/symfony/pull/21370">#21370</a></p>
<p dir="auto">Moving <code class="notranslate">PhpDocExtractor</code> before <code class="notranslate">ReflectionExtractor</code> changes behaviour in client code. This is a BC break.</p>
<p dir="auto">Example:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class TravelDestination
{
    /**
     * @var TravelDestinationType Type of the travel destination.
     *
     * @ORM\Column(type=&quot;travel_destination_type_enum&quot;, nullable=true)
     */
    protected $type;

    /**
     * Sets type.
     *
     * @param TravelDestinationType $type
     *
     * @return $this
     */
    public function setType(?TravelDestinationType $type)
    {
        $this-&gt;type = $type;

        return $this;
    }

    /**
     * Gets type.
     *
     * @return TravelDestinationType|null
     */
    public function getType(): ?TravelDestinationType
    {
        return $this-&gt;type;
    }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">TravelDestination</span>
{
    <span class="pl-c">/**</span>
<span class="pl-c">     * @var TravelDestinationType Type of the travel destination.</span>
<span class="pl-c">     *</span>
<span class="pl-c">     * @ORM\Column(type="travel_destination_type_enum", nullable=true)</span>
<span class="pl-c">     */</span>
    <span class="pl-k">protected</span> <span class="pl-c1"><span class="pl-c1">$</span>type</span>;

    <span class="pl-c">/**</span>
<span class="pl-c">     * Sets type.</span>
<span class="pl-c">     *</span>
<span class="pl-c">     * @param TravelDestinationType $type</span>
<span class="pl-c">     *</span>
<span class="pl-c">     * @return $this</span>
<span class="pl-c">     */</span>
    <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">setType</span>(?<span class="pl-smi"><span class="pl-smi">TravelDestinationType</span></span> <span class="pl-s1"><span class="pl-c1">$</span>type</span>)
    {
        <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">type</span> = <span class="pl-s1"><span class="pl-c1">$</span>type</span>;

        <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>;
    }

    <span class="pl-c">/**</span>
<span class="pl-c">     * Gets type.</span>
<span class="pl-c">     *</span>
<span class="pl-c">     * @return TravelDestinationType|null</span>
<span class="pl-c">     */</span>
    <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">getType</span>(): ?<span class="pl-smi"><span class="pl-smi">TravelDestinationType</span></span>
    {
        <span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">type</span>;
    }
}</pre></div>
<p dir="auto">Before:<br>
nullable is true (from <code class="notranslate">ReflectionExtractor</code>)</p>
<p dir="auto">After:<br>
nullable is false (from <code class="notranslate">PhpDocExtractor</code>)</p>