Review main Abandoned

85546[TASK] Decouple dependency serialization logic from Extension Model

Nikita Hovratov CR 0 V 0 Hard +377 −242 updated 03/26/25, 16:22

Commit message

In order to further strip down the model to a simple data object the
factory method `createFromExtensionArray` and co-method
`convertDependenciesToObjects` are extracted to dedicated classes. The
latter finds its new place in the already existing DependencyUtility,
where it fits best. In addition, its return type is changed to void, to
better signalize that it has side effects.

The factory method Dependency::createFromEmConf is moved to a dedicated
factory class "DependencyFactory".

The idea behind having it in the class model was to lazily trigger the
dependency conversion from serialized string to object in Fluid. This
approach is dropped in favor of explicitly calling the conversion method
at places, where dependencies are actually needed.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 16

Review log 1828

Show 23 earlier messages
  1. Nikita Hovratov uploaded patch set 1 08/06/24, 20:24

  2. core-ci voted on patch set 1 V -1 08/06/24, 20:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62971

  3. Nikita Hovratov uploaded patch set 2 V -1 08/06/24, 20:32

  1. core-ci voted on patch set 2 V +1 08/06/24, 20:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62972

  2. Nikita Hovratov uploaded patch set 3 V +1 10/26/24, 14:12

  3. core-ci voted on patch set 3 V -1 10/26/24, 14:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68675

  4. Nikita Hovratov uploaded patch set 4 V -1 10/26/24, 14:22

  5. core-ci voted on patch set 4 V -1 10/26/24, 14:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68676

  6. Nikita Hovratov uploaded patch set 5 V -1 10/26/24, 14:39

  7. core-ci voted on patch set 5 V -1 10/26/24, 14:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68677

  8. Nikita Hovratov uploaded patch set 6 V -1 10/26/24, 14:46

  9. core-ci voted on patch set 6 V +1 10/26/24, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68678

  10. Nikita Hovratov uploaded patch set 7 V +1 12/05/24, 19:28

  11. core-ci voted on patch set 7 V -1 12/05/24, 19:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70666

  12. Nikita Hovratov uploaded patch set 8 V -1 12/05/24, 19:39

  13. Nikita Hovratov uploaded patch set 9 12/05/24, 19:40

  14. core-ci voted on patch set 8 V -1 12/05/24, 19:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70668

  15. core-ci voted on patch set 9 V +1 12/05/24, 19:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70669

  16. Benni Mack voted on patch set 9 CR +1 12/10/24, 15:22

  17. Benni Mack commented on patch set 9 V +1 12/13/24, 17:08

    works on my machine(tm)
  18. Benjamin Franzke commented on patch set 9 CR -1 03/04/25, 12:56

    ExtensionRepository.php:366

    I feels fragile that we need to be clever enough not to forget to call `dependencyUtility->convertDependenciesToObjects` and to know *when* to call it. I'd love a lazy closure (as in our record objects) if the reason is performance.

    DependencyUtility.php:178

    Looks like this could use a `DepdencyFactory`.

    DependencyUtility.php:183

    The return type of this method implies that is is stateless, but it is actually stateful by modifying the input-object. It should therefore return `void`.
  19. Nikita Hovratov uploaded patch set 10 CR +1 V +1 03/04/25, 20:37

  20. core-ci voted on patch set 10 V +1 03/04/25, 20:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75113

  21. Nikita Hovratov commented on patch set 10 03/04/25, 20:50

    ExtensionRepository.php:366 Reply Unresolved

    I know, it also felt not right for me when I wrote it. But: As long as it is a Domain Model, it's very hard to have a proper "RecordFactory / RecordFieldTransformer" in between. The whole strategy of this patch is to first thin out the Model of every logic until only the properties are left. Then, I can finally remove all TCA and rewrite the repositories to query builder. For the meantime this is a workaround to call it explicitly where it's needed. These are however assessable and we are still on v14 dev, so I hope this fragileness is acceptable,

    DependencyUtility.php:178 Reply

    Done

    DependencyUtility.php:183 Reply

    Done
  22. Benni Mack commented on patch set 10 03/26/25, 10:56

    OK. I tried to work with this... I think that this strategy does not help in our overall goal to get rid of Extbase in our case. What I would do (will do a separate change): Switch to plain SQL queries in repository instead of Extbase Queries.
  23. Benni Mack voted on patch set 10 CR -1 03/26/25, 10:56

  24. Benni Mack marked it work in progress 03/26/25, 11:10

  25. Nikita Hovratov abandoned the change 03/26/25, 16:22