Repository navigation
Expose the key title in the Classification Store layout API - #2159
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
There was a problem hiding this comment.
🔵 Needs a closer look
Dependency-backed title resolution and serialized API responses remain unverified, so final maintainer validation is needed despite no confirmed defects.
No open issues 🎉
What changed in this PR
Verdict: Request review — runtime integration remains unverified.
This PR exposes the stored Classification Store key title in Studio’s key, group, and collection layout responses, allowing clients to choose their display labels.
Changes:
- Adds an optional, nullable
titletoKeyLayout, preserving existing constructor calls (src/ClassificationStore/Schema/KeyLayout.php:45–46). - Retrieves titles through the key configuration resolver in the service layer, addressing the missing response value without relying on the field definition’s title (
src/ClassificationStore/Service/KeyGroupLayoutService.php:102–111). Group layouts use the same lookup (src/ClassificationStore/Service/GroupService.php:134). - Adds schema and service regression tests and documents raw-title semantics, translation responsibility, and client fallback (
doc/02_Installation_and_Configuration/05_Upgrade.md:6–10).
Coverage and compatibility: The tests cover key retrieval, group propagation, collection propagation, and the optional schema argument. They check stored strings, nulls, and empty strings. The response field is additive; dependency-backed resolver behavior, service wiring, and serialized endpoint responses remain unverified. Tests were not executed during this review.
| File | Description |
|---|---|
tests/Unit/ClassificationStore/Service/KeyGroupLayoutServiceTest.php |
Tests verbatim stored titles, nulls, and empty strings. |
tests/Unit/ClassificationStore/Service/GroupServiceTest.php |
Tests title propagation to group keys. |
tests/Unit/ClassificationStore/Service/CollectionServiceTest.php |
Tests preservation of titles across collection groups. |
tests/Unit/ClassificationStore/Schema/KeyLayoutTest.php |
Tests the optional title argument and unchanged required fields. |
src/ClassificationStore/Service/KeyGroupLayoutServiceInterface.php |
Declares the stored-title lookup contract. |
src/ClassificationStore/Service/KeyGroupLayoutService.php |
Resolves stored titles and populates key layouts. |
src/ClassificationStore/Service/GroupService.php |
Populates group key titles and injects the object resolver interface. |
src/ClassificationStore/Schema/KeyLayout.php |
Adds the nullable title property, OpenAPI metadata, and getter. |
doc/02_Installation_and_Configuration/05_Upgrade.md |
Documents title behavior across all three endpoints. |
Review effort: Balanced



titletoKeyLayout, returned by the layout-by-key, layout-by-group and layout-by-collection endpoints.titlecolumn, not thetitleinsidedefinition. The two can differ after a rename through the configuration API.''stays'', and clients must fall back tonamethemselves.KeyConfigResolverInterfacebecause the core relation has no title, so group and collection layouts do one cached lookup per key.Resolves pimcore/product-management#1648