Review main Merged

87929[TASK] Have stateless workspaces ElementEntityProcessor

Christian Kuhn CR +2 V +2 Normal +53 −63 updated 01/30/25, 16:48

Commit message

Implementation details within ext:workspaces are partially
very hairy due to a rather complex construct of abstracted
callbacks. One key class is ElementEntityProcessor: It is
a service that performs manipulation of entities in certain
situations.

It is possible to reduce complexity of this service by
making it stateless:

* Property $dataHandler is only used to call the de facto
  static DH helper method getRelationFieldType(). This
  method can be inlined (and later simplified) to
  ElementEntityProcessor without headaches, which also
  allowes to protect this `@internal` DH method.

* Property $workspace is slightly more tricky: It is used
  in only one of the callbacks, the state is currently
  set by service consumers when the service is instantiated.
  The callback structure however already has a system to
  hand over additional arguments. We can leverage this
  to hand over the given workspace and can get rid of
  this ElementEntityProcessor state as well.

The patch implements these changes and simplifies some
related code along the way. ElementEntityProcessor is
now a readonly and shared service.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Andreas Kienast +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 68

  1. Christian Kuhn uploaded patch set 1 01/29/25, 19:00

  2. Christian Kuhn updated the commit message in patch set 2 01/29/25, 19:03

  3. core-ci voted on patch set 1 V +1 01/29/25, 19:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73151

  4. core-ci voted on patch set 2 V +1 01/29/25, 19:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73152

  5. Benni Mack voted on patch set 2 CR +1 V +1 01/30/25, 13:16

  6. Andreas Kienast voted on patch set 2 CR +1 V +1 01/30/25, 16:19

  7. Christian Kuhn voted on patch set 2 CR +2 V +2 01/30/25, 16:48

  8. Christian Kuhn merged patch set 3 01/30/25, 16:48