86261[BUGFIX] Fix usages of `RecordIdentityMap`
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Jochen Roth +1
- Benni Mack +1
-
Verified V +2 Done
- Oli Bartsch +2
- Jochen Roth +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 8
- typo3/sysext/backend/Classes/Preview/FluidBasedContentPreviewRenderer.php6+5 −6
- typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php+5 −7
- typo3/sysext/core/Classes/DataHandling/RecordFieldTransformer.php+19 −25
- typo3/sysext/core/Classes/Domain/RecordFactory.php+12 −3
- typo3/sysext/core/Tests/Functional/DataHandling/RecordFieldTransformerTest.php+110 −36
- typo3/sysext/core/Tests/Functional/Domain/RecordFactoryTest.php+20 −0
- typo3/sysext/frontend/Classes/Content/RecordCollector.php2+5 −11
- typo3/sysext/frontend/Classes/DataProcessing/PageContentFetchingProcessor.php4+8 −3
Review log 2431
Show 46 earlier messages
-
Oli Bartsch uploaded patch set 1 09/23/24, 07:53
-
core-ci voted on patch set 1 V -1 09/23/24, 08:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66419
-
Oli Bartsch uploaded patch set 2
V -109/23/24, 08:06 -
core-ci voted on patch set 2 V +1 09/23/24, 08:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66420
-
Andreas Kienast commented on patch set 2 09/23/24, 08:15
-
Andreas Kienast commented on patch set 2 09/23/24, 08:16
PageContentFetchingProcessor.php:56ReplyIf this is inevitable, you may add ``` TYPO3\CMS\Core\Domain\Persistence\RecordIdentityMap: shared: false ``` to `typo3/sysext/core/Configuration/Services.yaml`
-
Benjamin Franzke commented on patch set 2 09/23/24, 08:34
FluidBasedContentPreviewRenderer.php:99So this is basically a cache around `RecordFactory::createResolvedRecordFromDatabaseRow`. Can be build that into `RecordFactory::createResolvedRecordFromDatabaseRow` (and maybe name it `RecordFactory::getResolvedRecordFromDatabaseRow`)? -
Benni Mack commented on patch set 2 09/23/24, 08:59
FluidBasedContentPreviewRenderer.php:99ReplyIt's not a cache, as you could have different IdentityMaps based on Contextual settings. You want to dictate from the outside (not within the RecordFactory) what kind of record you want to create or if you want to check the IdentityMap first. The IdentityMap is similar to the Session object (Unit of Work) in Extbase, and we had some really painful problems with that, because the UoW does not care about language / workspace overlays. -
Benjamin Franzke commented on patch set 2 09/23/24, 09:03
FluidBasedContentPreviewRenderer.php:99Replybut the patch passes a `RecordIdentityMap` to `createResolvedRecordFromDatabaseRow`, which is used for all relations, but not the object itself? I looks like all context-sensitive settings should apply to the aggregate and to its relations, so the record identity map can be used for the aggregate by the record factory.PageContentFetchingProcessor.php:56ReplyPlease don't inject it at all then (we don't want `shared: false` if possible), rather instantiate via `new`. -
Oli Bartsch uploaded patch set 3
V +109/23/24, 14:39 -
Benni Mack commented on patch set 2 09/23/24, 14:41
FluidBasedContentPreviewRenderer.php:99Replyindeed. the idea for the RecordIdentityMap was the fact that EXT:CB had relations of a tt_content element, which then references to a slider, which then might reference another tt_content element, which then points to the actual original tt_content element again (e.g. CType=shortcut). Maybe we just need to ensure that a) we load existing objects from the RecordIdentityMap b) we get a IdentityMap instance based on the Context object ? Also, one thing to consider is whether we have RawRecord, Record or whatever other RecordInterface objects in the identity map, which is currently not defined / checked. -
core-ci voted on patch set 3 V -1 09/23/24, 14:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66445
-
Oli Bartsch uploaded patch set 4
V -109/23/24, 15:01 -
core-ci voted on patch set 4 V +1 09/23/24, 15:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66446
-
Oli Bartsch commented on patch set 4 09/23/24, 15:09
FluidBasedContentPreviewRenderer.php:99ReplyI updated the patch to have record factory handle the identity map check. IMO due to the fact that the map (to be used) is provided to the factory, the context is implicit and no need to check for the type of record, stored in the map.PageContentFetchingProcessor.php:56ReplyDone -
Benni Mack commented on patch set 4 CR +1 V +1 09/24/24, 07:05
FluidBasedContentPreviewRenderer.php:99Replyit's OK for me like that. -
Andreas Kienast commented on patch set 4 09/24/24, 07:17
RecordIdentityMap.php:48So you want to have this injectable via DI now? If so, why do we have to update PageContentFetchingProcessor then? -
Oli Bartsch uploaded patch set 5
CR +1V +109/24/24, 07:23 -
Oli Bartsch commented on patch set 5 09/24/24, 07:24
RecordIdentityMap.php:48ReplyGood catch, no DI. Removed the config. -
core-ci voted on patch set 5 V +1 09/24/24, 07:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66478
-
Simon Schaufelberger commented on patch set 5 09/24/24, 10:28
RecordCollector.php:65this can be simplified with an fn function call. I'll push an update. -
Simon Schaufelberger uploaded patch set 6
V +109/24/24, 10:29 -
Simon Schaufelberger commented on patch set 6 09/24/24, 10:30
RecordCollector.php:65ReplyDone -
Simon Schaufelberger wrote 09/24/24, 10:31
Removed cc Simon Schaufelberger. -
core-ci voted on patch set 6 V +1 09/24/24, 10:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66487
-
Oli Bartsch uploaded patch set 7
V +109/25/24, 14:58 -
core-ci voted on patch set 7 V +1 09/25/24, 15:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66598
-
Benni Mack voted on patch set 7 CR +1 V +1 09/25/24, 20:52
-
Jochen Roth voted on patch set 7 CR +1 V +1 09/28/24, 10:21
-
Oli Bartsch voted on patch set 7 CR +2 V +2 09/28/24, 14:47
-
Oli Bartsch merged patch set 8 09/28/24, 14:47
PageContentFetchingProcessor.php:56