83725[WIP][FEATURE] General purpose Relation Resolver
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 34
- typo3/sysext/core/Classes/DataHandling/RelationResolving/RelationResolver.php8new+567 −0
- typo3/sysext/core/Classes/DataHandling/RelationResolving/RelationResolverSession.phpnew+44 −0
- typo3/sysext/core/Classes/DataHandling/RelationResolving/ResolvedRelation.phpnew+28 −0
- typo3/sysext/core/Documentation/Changelog/13.2/Feature-103581-GeneralPurposeRelationResolver.rstnew+63 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/category_many_to_many.csvnew+12 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/category_many_to_many_localized.csvnew+18 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/category_one_to_many.csvnew+8 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/category_one_to_one.csvnew+7 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/circular_relation.csvnew+6 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/collections.csvnew+16 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/collections_recursive.csvnew+17 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/db_reference_hidden.csvnew+10 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/db_relation.csvnew+17 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/db_relation_mm.csvnew+12 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/db_relation_multiple.csvnew+8 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/db_relation_recursive.csvnew+14 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/file_reference.csvnew+9 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/folder_files.csvnew+3 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/foreign_table_select_multiple.csvnew+14 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/select_foreign.csvnew+9 −0
Show 14 more files
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/select_foreign_native.csvnew+4 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/Fixtures/DataSet/select_foreign_recursive.csvnew+13 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/TestFolder/sub/subfile.jpgnew+0 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/TestFolder/file.jpgnew+0 −0
- typo3/sysext/core/Tests/Functional/DataHandling/RelationResolving/RelationResolverTest.phpnew+610 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/Configuration/TCA/Overrides/tt_content.phpnew+361 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/Configuration/TCA/collection_inner.phpnew+163 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/Configuration/TCA/record_collection.phpnew+160 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/Configuration/TCA/test_record.phpnew+147 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/Configuration/TCA/typo3tests_contentelementb_collection.phpnew+163 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/Configuration/TCA/typo3tests_contentelementb_collection_recursive.phpnew+172 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/composer.jsonnew+14 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/ext_emconf.phpnew+18 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_relation_resolver/ext_tables.sqlnew+30 −0
Review log 2750
Show 1425 earlier messages
-
Nikita Hovratov uploaded patch set 1 04/09/24, 23:13
-
core-ci voted on patch set 1 V -1 04/09/24, 23:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55645
-
Nikita Hovratov uploaded patch set 2
V -104/09/24, 23:21 -
core-ci voted on patch set 2 V -1 04/09/24, 23:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55646
-
Nikita Hovratov uploaded patch set 3
V -104/11/24, 20:34 -
core-ci voted on patch set 3 V -1 04/11/24, 20:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55791
-
Nikita Hovratov uploaded patch set 4
V -104/11/24, 21:08 -
core-ci voted on patch set 4 V -1 04/11/24, 21:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55795
-
Nikita Hovratov uploaded patch set 5
V -104/11/24, 21:57 -
core-ci voted on patch set 5 V -1 04/11/24, 22:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55800
-
Christian Kuhn commented on patch set 5 04/12/24, 06:57
is this a new version of the query part of RelationHandler? -
Nikita Hovratov commented on patch set 5 04/12/24, 16:05
Reply
As discussed with lolli, I will try to migrate this to Refindex queries, as much as possible. If there are cases left (e.g. where a field index is necessary), then this will get patched beforehand. -
Nikita Hovratov rebased onto patch set 6
V -104/13/24, 11:52 -
core-ci voted on patch set 6 V -1 04/13/24, 11:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55909
-
Nikita Hovratov uploaded patch set 7
V -104/13/24, 12:20 -
core-ci voted on patch set 7 V -1 04/13/24, 12:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55911
-
Nikita Hovratov uploaded patch set 8
V -104/13/24, 16:43 -
core-ci voted on patch set 8 V -1 04/13/24, 16:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55913
-
Nikita Hovratov uploaded patch set 9
V -104/13/24, 21:03 -
core-ci voted on patch set 9 V -1 04/13/24, 21:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55917
-
Nikita Hovratov uploaded patch set 10
V -104/13/24, 22:46 -
core-ci voted on patch set 10 V -1 04/13/24, 22:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55918
-
Nikita Hovratov uploaded patch set 11
V -104/26/24, 19:57 -
core-ci voted on patch set 11 V -1 04/26/24, 20:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56804
-
Nikita Hovratov uploaded patch set 12
V -105/14/24, 16:13
-
core-ci voted on patch set 12 V -1 05/14/24, 16:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57723
-
Nikita Hovratov uploaded patch set 13
V -105/14/24, 18:00 -
core-ci voted on patch set 13 V +1 05/14/24, 18:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57724
-
Benni Mack uploaded patch set 14
V +105/14/24, 18:41 -
core-ci voted on patch set 14 V +1 05/14/24, 18:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57725
-
Nikita Hovratov uploaded patch set 15
V +105/14/24, 20:50 -
core-ci voted on patch set 15 V -1 05/14/24, 20:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57731
-
Nikita Hovratov uploaded patch set 16
V -105/14/24, 21:09 -
core-ci voted on patch set 16 V -1 05/14/24, 21:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57732
-
Nikita Hovratov uploaded patch set 17
V -105/15/24, 18:46 -
core-ci voted on patch set 17 V -1 05/15/24, 18:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57782
-
Nikita Hovratov uploaded patch set 18
V -105/15/24, 19:00 -
core-ci voted on patch set 18 V +1 05/15/24, 19:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57783
-
Nikita Hovratov uploaded patch set 19
V +105/15/24, 19:36 -
Nikita Hovratov uploaded patch set 20 05/15/24, 19:38
-
core-ci voted on patch set 19 V +1 05/15/24, 19:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57784
-
core-ci voted on patch set 20 V +1 05/15/24, 19:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57785
-
Nikita Hovratov uploaded patch set 21
V +105/15/24, 19:47 -
core-ci voted on patch set 21 V +1 05/15/24, 19:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57786
-
Christian Kuhn commented on patch set 21 CR -2 05/24/24, 12:01
Unresolved
had a chat with nikita. in general, this solution still has too many things that stem from content-blocks needs, and is neither performant, nor general enough. this patch will be hold-back for a while, and will for now not find its way into core as such.RelationResolver.php:45Unresolvedthe main api should at least handle multiple rows for one table at once to be able to resolve relations in a performant way. a later solution could even do that for multiple rows of multiple tables at once.RelationResolver.php:46Unresolvedwe should probably free a general relationResolver from record-type specific handling.RelationResolver.php:47Unresolvedresolve() does 3 things: find out which fields to resolve resolve fields to uid's resolve uids to records we should probably split this into distinct methods for a general api.RelationResolver.php:49Unresolvedodd. only recordFactory->createFromDatabaseRow() should be public, everything else should be protected, and this resolver probably does not need to use recordFactory at all, when type-dependent handling is removed.RelationResolver.php:97Unresolvedboth 'flex' and 'json' are odd: this 'convert' has nothing to do with relations. both should probably vanish from the class.RelationResolver.php:181Unresolvedthis feels odd in general. the best reference as overview on what refindex can do and can not do on the reading side do are the tests for RootlineUtility at the moment.RelationResolver.php:251Unresolvedthis is similar to resolve() but does it for multiple records, which resolve() should do in the first place (in a performant way). we also need to decide if we *really* need to resolve relation recursive, or if consumers should do that manually if needed.RelationResolver.php:418Unresolvedthese two queries could be combined in a union as demonstrated in RootlineUtility. -
Nikita Hovratov rebased onto patch set 22
V +105/24/24, 12:02Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Christian Kuhn updated the commit message in patch set 23 05/24/24, 12:02
Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 22 V +1 05/24/24, 12:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58155
-
core-ci voted on patch set 23 V +1 05/24/24, 12:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58156
-
Nikita Hovratov abandoned the change 08/16/24, 15:09
Superseded by https://review.typo3.org/c/Packages/TYPO3.CMS/+/85046