Closed
Description
Given the following service registered:
services:
Acme\Foo: ~
Running the following will fail:
bin/console debug:container Acme\Foo
The reason being the correct way would be to escape the backslash:
bin/console debug:container Acme\\Foo
# or
bin/console debug:container "Acme\Foo"
I however find a bit tedious and unfriendly: I register a service by a class but if I copy/paste the class I won't find the service... Plus it's a bit annoying manually escape if there is a lot of backslashes. Maybe the debug:container
command could be made a bit smarter to understand the AcmeFoo
is similar to Acme\Foo
.
Edit: The DX issue here IMO is that the simple copy/paste does not work (you need to escape the service name) and that can lead to confusion. Maybe the error message could help a bit with it