64319[TASK] Provide dependency injection configuration for extbase DataMapper
Commit message
Review
-
Code review CR +2 Done
- Alexander Schnitzler +2
- Sebastian Fischer +1
-
Verified V +2 Done
- Alexander Schnitzler +2
- Sebastian Fischer +1
- TYPO3com +1 CI
Issues 2
Files 1
Review log 910
-
Benjamin Franzke uploaded patch set 1 04/26/20, 21:55
-
Benjamin Franzke wrote 04/26/20, 21:55
Topic set to di -
Benjamin Franzke commented on patch set 1 CR -1 04/26/20, 22:02
Services.yaml:39We could also add `public: true` here. Advantages: * Allows to replace $objectManager->get(DataMapper::class) by $container->get(DataMapper::class) in core. * Allows to actually test this patch without installing an additional extension Disadvantages: * Do we actually want to create prototypes like these using the symfony DI container – or should we rather add a DataMapperFactory(?) -
TYPO3com voted on patch set 1 V +1 04/26/20, 22:06 Completed build in 11m 37s on Sun, 26 Apr, 10:06 PM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3036
-
Alexander Schnitzler commented on patch set 1 04/27/20, 07:00
Services.yaml:39ReplyThere are a few things I'd like to add. imo, DataMapper is not a prototype but a service. That's why I deprecated the $query argument in the constructor and let the core use setQuery instead which is also not the final solution here but I didn't want to mess up the structure of the class too much. Then this class is marked internal. This means, use at own risk. Of course we want to fix this bug but we don't have to do it in a non breaking manner imo. If this is an issue in 10, let's remove the query argument and have users use the setter. The core does so already. That's still not a clean service but passing the query through dozens of internal methods would be too much of a change now. That's something for 11 actually. -
Benjamin Franzke commented on patch set 1 CR 0 04/27/20, 07:18
Services.yaml:39Reply UnresolvedOk, great, given those plan I'd say we should not mark it as publicly available from the container. Also, let's add "shared: false" now and remove it once DataMapper has been refactored to also avoid `setQuery`. If two (core) services would start to use inject DataMapper, and both call `setQuery`, we run into ugly bugs without "shared: false". I think $query: null is the change that causes less "breakings" (of course, it's all @internal code, so no real "break") than removing the paramter. An extension may still use: $objectManager->get(DataMapper::class, $query). -
Sebastian Fischer voted on patch set 1 V +1 CR +1 04/27/20, 17:56
-
Benjamin Franzke commented on patch set 1 04/28/20, 08:23
Note, we discovered that this fix is already included in EXT:news: https://github.com/georgringer/news/blob/8.0.0/Configuration/Services.yaml#L33-L35 That means: a) EXT:news can/should be adapted once this is released b) you need to disable EXT:news to test this patch c) the change is actually already tested in production where v10 is used with EXT:news -
Alexander Schnitzler voted on patch set 1 V +2 CR +2 04/28/20, 08:23
-
Alexander Schnitzler merged patch set 2 04/28/20, 08:24