"new static" to "Yii::createObject" fix#895
Conversation
Result of finder (activeQuery) now included configured User
|
Help is needed to review this. |
|
I disagree with this change. I'd rather not add a dependency on the DI container to AR. The framework doesn't do it either so we'd be deviating from "normal" AR. Instead I'd recommend you implement a behavior instead. |
|
I will set config of |
|
@bscheshirwork not for AR models in most cases.. |
|
@SamMousa tell we about redefine it if needed |
|
... And so many times in framework code using DI in same case. Case "set class throw config" |
|
I don't get what you mean |
|
|
|
I know that; but I don't get the arguments. Anyway go ahead; I don't use the module anymore so if you feel it's a good addition I don't mind it :) |
|
If we use new static();we lose any config settings
p.s.: @SamMousa |
I use my own solution (meaning it's different for every project) |
Result of finder (activeQuery createModels) is correct configure new model
Example usage (without fix not included/trigger
on beforeDelete):