Skip to content

With 3.2.4 I can't inject AnnotationReader anymore #21648

Closed
@lbayerl

Description

@lbayerl
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version 3.2.4

Trying to inject AnnotationReader $reader in a service with `arguments: ['@annotation_reader'] worked fine in Symfony 3.2.3 but since upgrading to 3.2.4 it fails with:

construct() must be an instance of Doctrine\Common\Annotations\AnnotationReader, instance of Doctrine\Common\Annotations\CachedReader given

Might be worth mentioning that I am trying to inject it in an EventListener:

    request_cache_listener:
        class: MyCompany\MyBundle\EventListener\MyRequestListener
        arguments: ['@annotation_reader']
        tags:
            - { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
            - { name: kernel.event_listener, event: kernel.response, method: onKernelResponse }

This is probably caused by: #21556

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