-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Injection lazy loading #107
Conversation
vjik
commented
May 3, 2024
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #107 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 84 92 +8
===========================================
Files 7 9 +2
Lines 246 264 +18
===========================================
+ Hits 246 264 +18 ☔ View full report in Codecov by Sentry. |
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.
Also better add FQN
|
||
use Psr\Container\ContainerInterface; | ||
|
||
final class InjectionContainer implements InjectionContainerInterface |
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.
Looks like a dummy class that does nothing. Can we avoid it?
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.
We can use directly PSR container instead of it. But there are disadvantages:
- unnecessary method
has()
- method
get()
returnsmixed
, so we should check that it is object and throw exception if no.
Co-authored-by: Alexander Makarov <[email protected]>