Skip to content

[DX] Improve bad controller class error #11304

Closed
@weaverryan

Description

@weaverryan

Suppose you have this route:

homepage:
    pattern:  /
    defaults: { _controller: "FooBundle:Course2:index" }

But, no Course2Controller exists (you didn't create it yet, typo in its namespace, etc). The current error looks like this:

screen shot 2014-07-04 at 7 58 25 pm

The FooBundle:Course2 is a bit confusing, because I don't recognize that from anywhere (I typed FooBundle:Course2:index). I'd like to improve this error, perhaps:

The _controller value "FooBundle:Course2:index" maps to a "Knp\FooBundle\Controller\Course2Controller" class, but this class was not found. Create this class or check the spelling of the class and its namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)Good first issueIdeal for your first contribution! (some Symfony experience may be required)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions