router
router copied to clipboard
Add attributes support & improve `MatchingResult`
| Q | A |
|---|---|
| Is bugfix? | ✔️/❌ |
| New feature? | ✔️ |
| Breaks BC? | ✔️ |
| Fixed issues | comma-separated list of tickets # fixed by the PR, if any |
ℹ️ https://github.com/yiisoft/demo/pull/589
PR Summary
- 🚀 Optimized Middleware Handling Improved the way middlewares are managed in the Group class to avoid building them multiple times when they don't change, boosting efficiency.
- 🧹 Code Clean-up Removed unused classes and fixed some typos for better readability and maintenance.
- 🛠️ Refactoring Refactored various methods, attributes, and typehints for improved consistency, readability, and functionality.
- ✅ Improved Testing Enhanced the tests for the Group and RouteCollection classes, and fixed the bug in the RouteCollectionTest.
- 💡 Convenience Enhancements Added the withMiddlewares method to the DispatcherInterface for easier usage in certain cases.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
04be2f6) 78.66% compared to head (5be62b4) 83.72%.
:exclamation: Current head 5be62b4 differs from pull request most recent head 63467dc. Consider uploading reports for the commit 63467dc to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #196 +/- ##
============================================
+ Coverage 78.66% 83.72% +5.05%
- Complexity 188 228 +40
============================================
Files 13 23 +10
Lines 586 762 +176
============================================
+ Hits 461 638 +177
+ Misses 125 124 -1
| Files | Coverage Δ | |
|---|---|---|
| src/Attribute/Delete.php | 100.00% <100.00%> (ø) |
|
| src/Attribute/Get.php | 100.00% <100.00%> (ø) |
|
| src/Attribute/Head.php | 100.00% <100.00%> (ø) |
|
| src/Attribute/Options.php | 100.00% <100.00%> (ø) |
|
| src/Attribute/Patch.php | 100.00% <100.00%> (ø) |
|
| src/Attribute/Post.php | 100.00% <100.00%> (ø) |
|
| src/Attribute/Put.php | 100.00% <100.00%> (ø) |
|
| src/Attribute/Route.php | 100.00% <100.00%> (ø) |
|
| src/Group.php | 100.00% <100.00%> (ø) |
|
| src/MatchingResult.php | 100.00% <ø> (ø) |
|
| ... and 6 more |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
TODO: move collector to https://github.com/yiisoft/router-composer-attribute-collector