<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</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>3.4.8</td>
</tr>
</tbody>
</table>
<p dir="auto">Today i upgraded from Symfony 3.4.6 to 3.4.8 and the automatic redirect to website.test/login stopped working when hitting the homepage ( website.test ) as anonymous user using FOSUserBundle. All I see is welcome to Symfony 3.4.8</p>
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</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.3</td>
</tr>
</tbody>
</table>
<p dir="auto">After upgrading to symfony 3.2.3 the annotations are not being read from the cache but always parsed from the real classes.<br>
This decreases the performance of our functional tests drastically, don't know how it affects the real application because I have no benchmarks.</p>
<p dir="auto">Seems like the <strong>Doctrine\Common\Annotations\CachedReader</strong> doesn't get initialized.<br>
I found out that this is caused by the following change in the FrameworkExtension.php line 1046</p>
<p dir="auto"><a class="commit-link" href="https://github.com/symfony/symfony/compare/v3.2.2...v3.2.3#diff-0e793081ceb720201745c982a568903fL1046"><tt>v3.2.2...v3.2.3</tt>#diff-0e793081ceb720201745c982a568903fL1046</a></p>
<p dir="auto">which comes from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="202647669" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/21381" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/21381/hovercard" href="https://github.com/symfony/symfony/pull/21381">#21381</a></p>
<p dir="auto">If I restore the line or if I put <code class="notranslate">$container-&gt;setAlias('annotation_reader', 'annotations.cached_reader');</code> im my own AppBundle, an instance of <strong>Doctrine\Common\Annotations\CachedReader</strong> gets created and used as expected.</p>
<p dir="auto">My config.yml looks like this:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="framework:
    test: ~
    profiler:
        collect: true
    secret: &quot;secret&quot;
    router:
        resource: &quot;%kernel.root_dir%/config/routing.yml&quot;
        strict_requirements: ~
    templating:
        engines: ['twig']
    form:            ~
    csrf_protection: ~
    validation:      { enable_annotations: true }
    default_locale:  &quot;%locale%&quot;
    trusted_hosts:   ~
    trusted_proxies: ~
    session:
        storage_id: session.storage.mock_file
    fragments:       ~
    http_method_override: true"><pre class="notranslate"><span class="pl-ent">framework</span>:
    <span class="pl-ent">test</span>: <span class="pl-c1">~</span>
    <span class="pl-ent">profiler</span>:
        <span class="pl-ent">collect</span>: <span class="pl-c1">true</span>
    <span class="pl-ent">secret</span>: <span class="pl-s"><span class="pl-pds">"</span>secret<span class="pl-pds">"</span></span>
    <span class="pl-ent">router</span>:
        <span class="pl-ent">resource</span>: <span class="pl-s"><span class="pl-pds">"</span>%kernel.root_dir%/config/routing.yml<span class="pl-pds">"</span></span>
        <span class="pl-ent">strict_requirements</span>: <span class="pl-c1">~</span>
    <span class="pl-ent">templating</span>:
        <span class="pl-ent">engines</span>: <span class="pl-s">['twig']</span>
    <span class="pl-ent">form</span>:            <span class="pl-c1">~</span>
    <span class="pl-ent">csrf_protection</span>: <span class="pl-c1">~</span>
    <span class="pl-ent">validation</span>:      <span class="pl-s">{ enable_annotations: true }</span>
    <span class="pl-ent">default_locale</span>:  <span class="pl-s"><span class="pl-pds">"</span>%locale%<span class="pl-pds">"</span></span>
    <span class="pl-ent">trusted_hosts</span>:   <span class="pl-c1">~</span>
    <span class="pl-ent">trusted_proxies</span>: <span class="pl-c1">~</span>
    <span class="pl-ent">session</span>:
        <span class="pl-ent">storage_id</span>: <span class="pl-s">session.storage.mock_file</span>
    <span class="pl-ent">fragments</span>:       <span class="pl-c1">~</span>
    <span class="pl-ent">http_method_override</span>: <span class="pl-c1">true</span></pre></div>
<p dir="auto">How to deal with this?</p>