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

Skip to content

[DependencyInjection] [DX] Unhelpful error message when being stupid while declaring a service as a factory #18598

Closed
@lstrojny

Description

@lstrojny

Wrong:

<factory id="foo.factory" class="FooFactory"/>

Correct:

<factory service="foo.factory" class="FooFactory"/>

When doing it incorrectly, the error message says this:

RuntimeException in PhpDumper.php line 1437: Cannot dump definition because of invalid class name ('')

Maybe instead we can complain that the configuration is broken with a more meaningful error message.

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