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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lstrojny opened this issue Apr 20, 2016 · 3 comments

Comments

@lstrojny
Copy link
Contributor

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.

@linaori
Copy link
Contributor

linaori commented Apr 20, 2016

@lstrojny like this one? #18547

It's already merged so it should be there next release.

@stof
Copy link
Member

stof commented Apr 20, 2016

Closing as 3.1 will indeed have a better error message

@lstrojny
Copy link
Contributor Author

Yep, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants