Skip to content

Permit integer type for default_index_method in tagged locators #40319

@Bilge

Description

@Bilge

Description
Currently, tagged locators using the default_index_method static method name pointer must point to a method whose return type is string. However, my objects expose integer keys. Rather than rewrite my application to fit Symfony (where string does not make sense to the application), I think it better that Symfony should accept integer keys and internally convert them to string if so needed.

Example

  MyService:
    arguments:
      $foo: !tagged_locator
        tag: my_tag
        default_index_method: myStaticMethod # returns integer

Metadata

Metadata

Assignees

No one assigned

    Labels

    DependencyInjectionFeatureGood first issueIdeal for your first contribution! (some Symfony experience may be required)Help wantedIssues and PRs which are looking for volunteers to complete them.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions