Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.2.3 |
After upgrading to symfony 3.2.3 the annotations are not being read from the cache but always parsed from the real classes.
This decreases the performance of our functional tests drastically, don't know how it affects the real application because I have no benchmarks.
Seems like the Doctrine\Common\Annotations\CachedReader doesn't get initialized.
I found out that this is caused by the following change in the FrameworkExtension.php line 1046
v3.2.2...v3.2.3#diff-0e793081ceb720201745c982a568903fL1046
which comes from #21381
If I restore the line or if I put $container->setAlias('annotation_reader', 'annotations.cached_reader');
im my own AppBundle, an instance of Doctrine\Common\Annotations\CachedReader gets created and used as expected.
My config.yml looks like this:
framework:
test: ~
profiler:
collect: true
secret: "secret"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
templating:
engines: ['twig']
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
default_locale: "%locale%"
trusted_hosts: ~
trusted_proxies: ~
session:
storage_id: session.storage.mock_file
fragments: ~
http_method_override: true
How to deal with this?