Skip to content

The debug:container command is confusing #24562

Closed
@nicolas-grekas

Description

@nicolas-grekas
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 4.1

Would have been great for 3.4 but I guess it's too late now :)

When one runs the debug:container command, the list of public services is displayed.
If the --show-private flag is passed, private services are displayed also.

This logic is build on / suggests a false assumption: that public services are more for "userland", while private services are more "internal". This is completely wrong. Of course, the confusion comes from the word "private", that convey this semantic when applied on classes.

I think we need a new semantic that would allow devs to discover more easilly which services/aliases they can reference or type-hint for (when using autowiring), vs which services are more internal and are not meant to be referenced.

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