-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"new static" to "Yii::createObject" fix #895
base: master
Are you sure you want to change the base?
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
):