8000 [Bug][BC break][DependencyInjection] Resolve arguments of service broken in 4.2 · Issue #29412 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Bug][BC break][DependencyInjection] Resolve arguments of service broken in 4.2 #29412
Closed
@peterrehm

Description

@peterrehm

Symfony version(s) affected: 4.2

Description
After the upgrade from 4.1 to 4.2 I am getting the error:

'The service "twig" has a dependency on a non-existent service "mopa_bootstrap.navbar_renderer".'

This is due to the following service definition in an external bundle:

services:
    mopa_bootstrap.navbar_renderer:
        class: Mopa\Bundle\BootstrapBundle\Navbar\Renderer\NavbarRenderer
        arguments: [ '@service_container', [] ]
        tags:
            # The alias is what is used to retrieve the menu
            - { name: knp_menu.renderer, alias: navbar }

    mopa_bootstrap.navbar.twig.extension:
        class: Mopa\Bundle\BootstrapBundle\Navbar\Twig\NavbarExtension
        arguments: [ '@mopa_bootstrap.navbar_renderer' ]
        tags:
            -  { name: twig.extension }

If I add public: true to mopa_bootstrap.navbar_renderer it works as expected.
This seems strange as it is properly injected. Any idea?

How to reproduce

Possible Solution

Additional context

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

      0