8000 [DependencyInjection] Support attribute autoconfiguration on static methods/properties · Issue #47060 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000
[DependencyInjection] Support attribute autoconfiguration on static methods/properties #47060
Closed
@alex-dev

Description

@alex-dev

Description

A static method can be used to carry complex configuration payload for DI.
A static method can be used to generate a Closure that can be hooked in the container (a static message handler with no dependency).
Not checking static method disallow using simple attribute autoconfigurator to wire those case easily.

Example

class A {
  #[SomeAttribute]
  public static function config(): mixed {}
}

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