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

[DependencyInjection] incomplete support for arrays in tag attribute values #48956

Copy link
Copy link
Closed
@ju1ius

Description

@ju1ius
Issue body actions

Symfony version(s) affected

6.2

Description

PR #47364 introduced support for using arrays in tag attribute values.

However the feature is not currently usable because such values are rejected by the CheckDefinitionValidityPass.

How to reproduce

The following service configuration:

$configurator->services()
  ->set(Foo::class)
  ->tag('foo', ['bar' => ['baz' => 42]);

throws:

[Symfony\Component\DependencyInjection\Exception\RuntimeException]
at symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php line 67:
A "tags" attribute must be of a scalar-type for service "App\Foo", tag "foo", attribute "bar".

Possible Solution

No response

Additional Context

No response

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.