Skip to content

autowired service is loosing visibility (gets public) #24768

Closed
@mkingbe

Description

@mkingbe
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.10

If you load a service (autowired) in a Controller via dependency injection and try to use in a console command via ContainerAwareCommand, the service becomes public.
IMO it should not be available from ContainerAwareCommand event if is used in other place with dependency injection.

Not sure if this is the expected behavior or not as I didn't find any information regarding it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions