Skip to content

Bad service name on not-autowirable controller #31997

@nicolas-grekas

Description

@nicolas-grekas

Symfony version(s) affected: 4.3.1

When I type-hint a not-existing type on a controller, I get an error message that contains an id I know nothing about:

Cannot autowire service "debug.argument_resolver.not_tagged_controller.inner": argument "$twig" of method "__construct()" has type "App\Environment" but this class was not found.

This should be this instead:

Cannot autowire service "App\Controller\HelloController": argument "$twig" of method "__construct()" has type "App\Environment" but this class was not found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions