Repository navigation
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The batched detail and preview reads lack adapter-level regression coverage for group-to-key mapping and preservation of resolver-provided relation order.
1 open issue
What changed in this PR
This PR centralizes Classification Store key-relation reads in a request-scoped resolver, reducing repeated database loads across Studio layouts, object data, grid columns, and filters.
Changes:
- Adds per-group caching, batched loading, cloned results, and reset support.
- Migrates consumers to the resolver and clears cached relations after configuration writes.
- Adds resolver, filter, and invalidation tests; documents deterministic adapter ordering and internal interface changes.
Tests were not run in this review environment.
| File | Description |
|---|---|
| tests/Unit/Grid/Column/Resolver/DataObject/ClassificationStoreResolverTest.php | Updates the resolver dependency mock. |
| tests/Unit/DataObject/Data/Adapter/ClassificationStoreAdapterTest.php | Wires the new adapter dependency. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/TimeFilterTest.php | Tests resolved-key time ranges. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/StringFilterTest.php | Tests string filtering and validation. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/SelectFilterTest.php | Tests select filtering and validation. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/RGBAFilterTest.php | Tests color channels and validation. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilterTest.php | Tests value/unit filtering and validation. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilterTest.php | Tests datetime filtering without day rounding. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/DateFilterTest.php | Tests date filtering with day rounding. |
| tests/Unit/DataIndex/Filter/DataObject/Classificationstore/BooleanFilterTest.php | Tests boolean filtering and validation. |
| tests/Unit/DataIndex/Filter/ClassificationStoreFilterTestTrait.php | Shares resolver mocks and string/array inputs. |
| tests/Unit/ClassificationStore/Service/KeyRelationResolverTest.php | Tests caching, batching, cloning, ordering, and resets. |
| tests/Unit/ClassificationStore/Service/KeyGroupLayoutServiceTest.php | Updates relation lookup expectations. |
| tests/Unit/ClassificationStore/Service/GroupServiceTest.php | Uses keyed resolver results. |
| tests/Unit/ClassificationStore/Service/Configuration/StoreServiceTest.php | Tests cache clearing after store writes. |
| tests/Unit/ClassificationStore/Service/Configuration/KeyServiceTest.php | Tests cache clearing after key writes. |
| tests/Unit/ClassificationStore/Service/Configuration/KeyGroupRelationServiceTest.php | Tests invalidation after relation writes. |
| tests/Unit/ClassificationStore/Service/Configuration/GroupServiceTest.php | Tests invalidation after group writes. |
| tests/Unit/ClassificationStore/Service/Configuration/CollectionServiceTest.php | Tests invalidation after collection writes. |
| tests/Unit/ClassificationStore/Service/Configuration/CollectionRelationServiceTest.php | Tests invalidation after collection-relation writes. |
| src/Grid/Column/Resolver/DataObject/ClassificationStoreResolver.php | Uses cached relations while preserving stale-key errors. |
| src/DataObject/Data/Adapter/ClassificationStoreAdapter.php | Batches detail/preview reads through the resolver. |
| src/DataIndex/Filter/DataObject/Classificationstore/TimeFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/StringFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/SelectFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/RGBAFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/QuantityValueFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/NumberFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/InputQuantityValueFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/DateTimeFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/DateFilter.php | Uses cached key lookup. |
| src/DataIndex/Filter/DataObject/Classificationstore/BooleanFilter.php | Uses cached key lookup. |
| src/ClassificationStore/Service/KeyRelationResolverInterface.php | Defines cached single-group and batch reads. |
| src/ClassificationStore/Service/KeyRelationResolver.php | Implements caching, cloning, and reset behavior. |
| src/ClassificationStore/Service/KeyGroupLayoutService.php | Resolves layout keys through the cache. |
| src/ClassificationStore/Service/GroupService.php | Uses cached group relations for layouts. |
| src/ClassificationStore/Service/Configuration/StoreService.php | Clears relations after store writes. |
| src/ClassificationStore/Service/Configuration/KeyService.php | Clears relations after key writes. |
| src/ClassificationStore/Service/Configuration/KeyGroupRelationService.php | Clears relations after relation writes. |
| src/ClassificationStore/Service/Configuration/GroupService.php | Clears relations after group writes. |
| src/ClassificationStore/Service/Configuration/CollectionService.php | Clears relations after collection writes. |
| src/ClassificationStore/Service/Configuration/CollectionRelationService.php | Clears relations after collection-relation writes. |
| src/ClassificationStore/Repository/KeyGroupRelationRepositoryInterface.php | Replaces individual lookups with batch loading. |
| src/ClassificationStore/Repository/KeyGroupRelationRepository.php | Loads multiple groups in ascending ID order. |
| doc/02_Installation_and_Configuration/05_Upgrade.md | Documents caching, ordering, and interface changes. |
| config/classification_store.yaml | Registers the shared resolver service. |
Review effort: Balanced
…groupIds) in KeyGroupRelationRepository::getByGroupIds(); Added Codeception coverage for getDetailData() and getPreviewFieldData() asserting requested group ids, group-to-key mapping and resolver-provided relation order Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
lukmzig
marked this pull request as ready for review
October 27, 2026 19:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Adds a request-scoped
KeyRelationResolverso Classification Store key-to-group relations are loaded once per group instead of once per call.@internalKeyRelationResolverthat memoises relations per group, returns clones, and is cleared bykernel.resetand by every Classification Store configuration writegetClassificationStoreKeysFromGroup()now returns keys in id ascending order instead of MySQL's unspecified order, so key order in object detail and search preview is deterministicInvalidArgumentExceptionfor a stale key id, so its error code is unchangedResolves pimcore/product-management#1658