Repository navigation
Leave to-many and non-resource associations out of page data properties - #617
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #617 +/- ##
=========================================
Coverage 97.25% 97.25%
- Complexity 5604 5606 +2
=========================================
Files 461 461
Lines 14364 14366 +2
=========================================
+ Hits 13969 13971 +2
Misses 395 395
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
PageDataMetadataFactorymade every association of a page data class (apart fromAbstractPageData's own) a page data property, to-many ones included. A to-many one ended up inPageDataProvider'spd.<property> = :component, so every flush writing an entity it holds was a 500 ("Invalid PathExpression … SingleValuedAssociationField expected"), and it was listed as a component slot.An association to a class that is not an API resource also broke: AP returns an empty metadata collection, so
$metadataCollection[0]->getShortName()was a call on null, a 500 for that class's page data metadata and for any flush that builds every page data metadata.tests/Metadata/Factory/PageDataMetadataFactoryTest.php.tests/Functional/Page/PageDataCollectionAssociationTest.php, with a newPageDataWithVariants(OneToManyvariantsto a newDummyPageDataVariantresource, ManyToOnesupplierto a non-resourceDummyPageDataSupplier). The page data metadata collection count goes from 9 to 10.🤖 Generated with Claude Code