Igor Glagola
Igor Glagola
@cebe By the way, maybe it is also a bug: If rule has specified no $on, and no $except, it would not be common for all scenarios
Let me illustrate the problem: ```php class Foo { public function __construct() { // Foo will be created twice echo "Foo", PHP_EOL; } } class Bar { public function __construct(Foo...
So basically, My suggestion is about storing created dependencies as singletons by default
> what is the problem with calling setSingleton for the classes which need to be singletons? The problem is that majority of created dependencies usually are singletons, it is much...
> So it is hard for you to type additional 9 letters (setSingleton() instead of set()) during method invocation? I used `setSingleton()` to solve the issue, if DI container will...
We are talking about different things, I'm talking about dependency resolving&storing them as singletons(if opposite was not declared specifically), you are talking about object creation&configuration. But anyway, let me explain...
> I do not consider this to be true. It will be great to see examples
> If it would be so, how I can define a singleton with custom configuration? I think, you will can declare it again via `\Yii::$container->setSingleton(...)` to preserve singleton behavior and...
Hi, sorry for long silence, It is not BC break, I just want to reuse created dependencies as singletons if they were not defined explicitly in the container.