Repository navigation
Consolidate internal URI template, command target, and body request helpers - #329
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #329 +/- ##
===========================================
Coverage 100.00% 100.00%
+ Complexity 882 878 -4
===========================================
Files 118 121 +3
Lines 1973 1965 -8
===========================================
- Hits 1973 1965 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
Action performed
|
ResourceBodyEvaluator transforms a body for storage and never enumerated requests itself, so the enumeration moves to a stateless iterable built by EmbeddedRequests::of(). CacheDependencyCollector and Dependencies no longer take a ResourceBodyEvaluator. The CommandTargets $purge docblock now states that collection link URIs follow the #[Purge]/#[Refresh] ones.
677b04c to
328d9e4
Compare
Summary
Pure internal refactoring to consolidate duplicated logic and tighten boundaries across
@internalclasses (no public API or behavior changes):UriTemplates(src/UriTemplates.php, bound withoutScope::SINGLETONinCacheableModule): consolidates RFC 6570 URI template parsing and expansion shared byDependsOnExpansion,DependsOnTags,RefreshAnnotatedCommand, andRefreshTemplateValidator. Removes duplicatedvariableNames()fromRefreshTemplateValidatorand narrowsDependsOnTemplatesto#[DependsOn]reflection caching (ofOnGet()).CommandTargetsvalue object (src/CommandTargets.php): replaces the rawarray{list<Uri>, list<Uri>}tuple returned byRefreshAnnotatedCommand::declared()and simplifiesCommandInterceptor(removesrefreshDeclared()and intermediate array reshaping).EmbeddedRequests(src/EmbeddedRequests.php):EmbeddedRequests::of($ro)iterates the top-level embedded requests of a body, moved fromDependsOnTags.CacheDependencyCollectorandDependenciesno longer take aResourceBodyEvaluator;DependsOnTagsTestbecomesEmbeddedRequestsTest.Dependencies $etagsparameter to$dependenciesinResourceDonut.DonutRepository::classsingleton binding inDonutCacheModule.Scope::SINGLETONfrom statelessGlobalServerContextinQueryRepositoryModule.QueryRepository::setCacheDependency()and update stale docblock references toCacheDependencyCollector::collect().initializePools->initializePool,prifix->prefixinResourceStorage;$dns->$dsninRedisDsnProvider).Test plan
./vendor/bin/phpmd src text ./phpmd.xml— 0 violationscomposer cs— 71/71 passcomposer sa— Psalm 0 errors, PHPStan 266/266 OKcomposer test— 941 tests, 3117 assertions, 0 failuressrc/)xsteponCommandInterceptor,RefreshTemplateValidatorandEmbeddedRequestsSummary by CodeRabbit