-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
I found a strand behavior with servicecontainer and autowire.
When I inject a service container and autowire it, the parameter bag is not resolved.
Basicly, with this definition of my service
widget.manager:
class: Widgets\Bundle\CoreBundle\Manager\WidgetManager
arguments: ['@widget.renderer', '@service_container']
I am able to get parameters like:
$this->serviceContainer->getParameter('my.param')
But when I use autowire like this
widget.manager:
class: Widgets\Bundle\CoreBundle\Manager\WidgetManager
autowire: true
on the same service, the parameter bag is not resolved and i get an error like "the prameter 'my parameter' does not exist".
Maybe it's a normal behavior, cause the service container is a special service, but we should have at least some meaningfull error.