-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Explain why DI fails sometimes and how to fix this (#20010) #20108
Explain why DI fails sometimes and how to fix this (#20010) #20108
Conversation
skepticspriggan
commented
Jan 27, 2024
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ❌ |
Breaks BC? | ❌ |
Fixed issues | #20010 |
PR Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #20108 +/- ##
=======================================
Coverage 48.02% 48.02%
=======================================
Files 445 445
Lines 43892 43892
=======================================
Hits 21080 21080
Misses 22812 22812 ☔ View full report in Codecov by Sentry. |
docs/guide/concept-di-container.md
Outdated
@@ -396,6 +396,18 @@ class HotelController extends Controller | |||
} | |||
``` | |||
|
|||
Note that not all core code supports DI due to performance concerns. You can add support if needed by overriding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's correct for AR only. Are there any other cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find other cases.
I wrote it this way because it seemed the most durable. It is technically correct now and would also be true if a case is discovered or added in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move this note into AR guide instead.
Thanks. |
Glad to contribute |
…iisoft#20108) * Explain why DI fails sometimes and how to fix this (yiisoft#20010) * Explain why AR does not support DI by default and how to support it (yiisoft#20010)