-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
services:
app.menu:
class: AppBundle\Menu\Builder
autowire: true
# arguments:
# - '@router'
# - '@service_container'
Before i comment the arguments, the service is work. After that i try to use auto wiring mode and got error
[Symfony\Component\DependencyInjection\Exception\RuntimeException]
Unable to autowire argument of type "Symfony\Component\DependencyInjection\ContainerInterface" for the service "app.menu".
And then i try to add auto wire type
services:
app.menu:
class: AppBundle\Menu\Builder
autowire: true
autowiring_types: Symfony\Component\DependencyInjection\ContainerInterface
# arguments:
# - '@router'
# - '@service_container'
and i got another error
[Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException]
Circular reference detected for service "app.menu", path: "app.menu -> app.menu".