You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 {}
}
The text was updated successfully, but these errors were encountered:
…n on static methods (alex-dev)
This PR was squashed before being merged into the 6.3 branch.
Discussion
----------
[DependencyInjection] Allow attribute autoconfiguration on static methods
| Q | A
| ------------ | ---
| Branch? | 6.2
| Bug fix? | no
| Tickets | #47060
| License | MIT
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).
Using simple attribute autoconfigurator to wire those case easily.
Commits
-------
9908415 [DependencyInjection] Allow attribute autoconfiguration on static methods
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
The text was updated successfully, but these errors were encountered: