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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(doctrine): stateOptions can handleLinks for query optimization #5732
feat(doctrine): stateOptions can handleLinks for query optimization #5732
Changes from all commits
111a066
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 130 in src/Doctrine/Common/State/LinksHandlerTrait.php
Codecov / codecov/patch
src/Doctrine/Common/State/LinksHandlerTrait.php#L129-L130
Check warning on line 133 in src/Doctrine/Common/State/LinksHandlerTrait.php
Codecov / codecov/patch
src/Doctrine/Common/State/LinksHandlerTrait.php#L133
Check warning on line 50 in src/Doctrine/Odm/Metadata/Resource/DoctrineMongoDbOdmResourceCollectionMetadataFactory.php
Codecov / codecov/patch
src/Doctrine/Odm/Metadata/Resource/DoctrineMongoDbOdmResourceCollectionMetadataFactory.php#L50
Check warning on line 47 in src/Doctrine/Odm/PropertyHelperTrait.php
Codecov / codecov/patch
src/Doctrine/Odm/PropertyHelperTrait.php#L47
Check warning on line 37 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L37
Check warning on line 40 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant with
DoctrineMongoDbOdmResourceCollectionMetadataFactory
,ODM/ItemProvider
,ODM/LinksHandlerTrait
,GraphQl/FieldsBuilder
,Hydra/CollectionFiltersNormalizer
, etc.Can't it be in a more generic trait (e.g.
Doctrine/Common/OptionsTrait
) or something similar? (same with ORM)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a quite hard problem I'm not a huge fan of the current dependency between CollectionFiltersNormalizer and state options as when we'll need to subtree split we potentially won't have access to them. When working on this we probably need to uplift this information into some
$context['filter_class']
as this option allows filters do be described on an entity instead of on a resource... This adds complexity whereas to where to put the Trait, and also would need specific implementations (ODM vs ORM). I'd like to keep this as-is for now.Magic is hard to implement correctly :|.
Check warning on line 47 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L45-L47
Check warning on line 51 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L51
Check warning on line 53 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L53
Check warning on line 55 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L55
Check warning on line 61 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L60-L61
Check warning on line 63 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L63
Check warning on line 67 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L67
Check warning on line 70 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L69-L70
Check warning on line 77 in src/Doctrine/Odm/State/CollectionProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/CollectionProvider.php#L77
Check warning on line 40 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L40
Check warning on line 43 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L43
Check warning on line 50 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L48-L50
Check warning on line 54 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L54
Check warning on line 58 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L58
Check warning on line 61 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L61
Check warning on line 63 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L63
Check warning on line 69 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L68-L69
Check warning on line 71 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L71
Check warning on line 75 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L75
Check warning on line 78 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L77-L78
Check warning on line 84 in src/Doctrine/Odm/State/ItemProvider.php
Codecov / codecov/patch
src/Doctrine/Odm/State/ItemProvider.php#L84