Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Named argument binding doesn't support !tagged_locator #34913

Copy link
Copy link
Closed
@Bilge

Description

@Bilge
Issue body actions

Symfony version(s) affected: 4.4.0

Description
Named argument binding doesn't support !tagged_locator.

How to reproduce

services:
    _defaults:
        bind:
            Psr\Container\ContainerInterface $foo: !tagged_locator my.locator

Invalid value for binding key "Psr\Container\ContainerInterface $foo" for service "Some\Unrelated\Service\That\Doesn't\Even\Have$foo\Argument": expected null, an instance of Symfony\Component\DependencyInjection\Reference or an instance of Symfony\Component\DependencyInjection\Definition or an instance of Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument, object given.

Possible Solution
Works fine if type is omitted, e.g. $foo: !tagged_locator my.locator. Breaks as soon as Psr\Container\ContainerInterface is specified as a type prefix, by attempting to inject into every service instead of just those with matching parameters.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.