-
-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (59579ea) to head (cc81a0a).
Additional details and impacted files
@@ Coverage Diff @@ ## master #400 +/- ## =========================================== Coverage 100.00% 100.00% - Complexity 184 221 +37 =========================================== Files 11 11 Lines 500 599 +99 =========================================== + Hits 500 599 +99
☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
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.
Pull request overview
Performance-focused update to the DI container implementation, adding internal caching and restructuring definition preparation to reduce overhead in common code paths.
Changes:
- Added caching for
Container::has()results andCompositeContainerdelegate lookups. - Reworked definition preparation/validation paths (including a no-validation fast path) and reduced redundant work in
build(). - Expanded benchmarks and added a unit test for empty-string class definitions.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/Container.php |
Adds has() caching, refactors definition preparation/validation, and optimizes build path. |
src/CompositeContainer.php |
Adds lookup caching for faster delegate resolution. |
tests/Unit/ContainerTest.php |
Adds regression test for empty string definition validation. |
tests/Benchmark/ContainerBench.php |
Adds no-validation benchmark variants for construct/lookups. |
tests/Benchmark/TypicalUsageBench.php |
Introduces a new benchmark suite covering typical container usage scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
� Conflicts: � src/Container.php
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.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot
AI
Apr 24, 2026
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.
Adding getHasCacheLimit() to ContainerConfigInterface is a backwards-incompatible API change: any downstream code that provides its own ContainerConfigInterface implementation will now fail to compile until it adds this method. The PR metadata says "Breaks BC? ❌"; either adjust that statement / release notes accordingly, or avoid changing the existing interface (e.g., add a separate optional interface and fall back to the default limit when the method is absent).
samdark
commented
Apr 24, 2026
Should be re-evaluated after yiisoft/definitions#114
Uh oh!
There was an error while loading. Please reload this page.
Performance optimizations. Overall results compared to
master:What was done:
There's a BC break because it makes a cache cap for
has()configurable by adding it to the interface.