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
When a factory is at the root of the definition array, it is automatically interpreted as a factory (DI\factory() is not necessary).
However it's not the case if the closure is in an array or an object parameter.
We could simplify the behavior and always consider a closure as a factory. If a user wants to really inject a closure, DI\value() is here for that. The behavior will at least be more consistent and simple.
The text was updated successfully, but these errors were encountered:
When a factory is at the root of the definition array, it is automatically interpreted as a factory (
DI\factory()
is not necessary).However it's not the case if the closure is in an array or an object parameter.
We could simplify the behavior and always consider a closure as a factory. If a user wants to really inject a closure,
DI\value()
is here for that. The behavior will at least be more consistent and simple.The text was updated successfully, but these errors were encountered: