Skip to content

Service container documentation (^4.2 and ^5.0) is wrong/misleading #12978

Closed
@debo

Description

@debo

As per subject the documentation for symfony 5 but likely all the versions following 4.2 is rather misleading but let me elaborate.

Starting from this section a user will, possibly, end up here where the documentation explains how services can be made public available and easily consumable via the service container itself.

Unfortunately this is not possible because, as I faced, but also as reported here and here the AbstractController class doesn't provide access to the actual container anymore and the old base Controller class is completely deprecated and as such not available to developers.

This as you can understand made this specific part of the documentation not current and irrelevant and it also let me to hours and hours of headache to try to understand what I was doing wrong except there was nothing wrong.

I know I'm not offering a solution here bu I hope my report helps.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions