Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

The cached annotations are not read after upgrading to 3.2.3 #21576

Copy link
Copy link
Closed
@lubomir-haralampiev

Description

@lubomir-haralampiev
Issue body actions
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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.