Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve misleading error message when controller service is not found #26359

Closed
@ahundiak

Description

@ahundiak
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.3.3

So I got this:

Controller "fos_rest.exception.twig_controller" 
cannot be fetched from the container because it is private. 
Did you forget to tag the service with "controller.service_arguments"

And naturally went looking for why the controller was not public. Turned out the controller was simply not defined at all. I think a simple:

cannot be fetched from the container because it is undefined or private

Might save some developer effort.

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