Review main Merged

86084[TASK] Extract settings tree diff into a object and add tests

Benjamin Franzke CR +2 V +2 Hard +320 −91 updated 03/25/25, 16:01

Commit message

Split the `computeSettingsDiff` into a self-constructing data object
and a form-data transformation backed by the site settings factory.
The diff algorithm does not depend on any site context and is
therefore implemented generically. Currently missing tests are added
along the way.
Arrays are now transformed into settings objects as early as possible in
order to reduce the amount of different arrays formats (settings map vs
tree) that are passed around.

Review

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

Issues 1

Files 5

Review log 2841

Show 916 earlier messages
  1. Benjamin Franzke uploaded patch set 1 09/13/24, 09:30

  2. core-ci voted on patch set 1 V -1 09/13/24, 09:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65649

  3. Benjamin Franzke uploaded patch set 2 V -1 09/13/24, 11:23

  4. core-ci voted on patch set 2 V +1 09/13/24, 11:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65670

  5. Stefan Bürk commented on patch set 2 09/13/24, 20:01

    SiteSettingsService.php:95

    Hint: No usage of named arguments when calling core api (and third party api). And this is not a exception we documented. https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/CodingGuidelines/CodingBestPractices/NamedArguments.html#invoking-core-api > Setting a good example for extension authors
  6. Benjamin Franzke uploaded patch set 3 V +1 09/14/24, 04:33

  7. Benjamin Franzke commented on patch set 3 09/14/24, 04:33

    SiteSettingsService.php:95 Reply

    Done
  8. core-ci voted on patch set 3 V +1 09/14/24, 04:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65736

  9. Benjamin Franzke uploaded patch set 4 V +1 09/16/24, 12:37

  10. core-ci voted on patch set 4 V +1 09/16/24, 12:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65885

  11. Benjamin Franzke uploaded patch set 5 V +1 09/16/24, 14:15

  12. core-ci voted on patch set 5 V -1 09/16/24, 14:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65897

  13. Benjamin Franzke uploaded patch set 6 V -1 09/16/24, 14:33

  14. core-ci voted on patch set 6 V +1 09/16/24, 14:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65898

  15. Benjamin Franzke uploaded patch set 7 V +1 09/16/24, 15:26

  16. core-ci voted on patch set 7 V +1 09/16/24, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65901

  1. Benni Mack voted on patch set 7 CR +1 V +1 09/18/24, 08:37

  2. Andreas Kienast commented on patch set 7 09/18/24, 13:55

    SettingsComposer.php:30

    Class is already `readonly`

    SettingsComposer.php:87

    We could combine both `if()`s
  3. Benjamin Franzke uploaded patch set 8 CR +1 V +1 09/20/24, 03:30

  4. Benjamin Franzke commented on patch set 8 09/20/24, 03:30

    SettingsComposer.php:30 Reply

    Done

    SettingsComposer.php:87 Reply

    I somehow prefered this variant for readability, but I don't care. adapted.
  5. core-ci voted on patch set 8 V +1 09/20/24, 03:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66273

  6. Benjamin Franzke uploaded patch set 9 V +1 10/10/24, 15:08

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

  8. Christian Kuhn commented on patch set 9 CR -1 10/11/24, 07:26

    SettingsComposer.php:23

    class name SettingsComposer really does not say much. This class and/or the primary service method requires a comment telling what this is about, what it aims for, and where it is used, probably what is meant with all these input arrays. Example $localSettingsTree: hey, all my settings are local of course, what do you mean with 'local' in this context?
  9. Christian Kuhn commented on patch set 9 10/11/24, 07:30

    'Extract "whatever this is" to a service and add coverage' or something similar. I'd say the new service is at least as important as the added test coverage and should be reflected in the title.
  10. Benjamin Franzke marked it work in progress 12/19/24, 09:37

  11. Benjamin Franzke uploaded patch set 10 CR -1 V +1 01/09/25, 11:02

  12. core-ci voted on patch set 10 V +1 01/09/25, 11:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72132

  13. Benjamin Franzke uploaded patch set 11 V +1 01/09/25, 11:50

  14. core-ci voted on patch set 11 V +1 01/09/25, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72137

  15. Benjamin Franzke commented on patch set 11 01/10/25, 09:18

    This change is ready for review.

    Reply

    Thanks! done

    SettingsComposer.php:23 Reply

    ack, I am struggling a bit with proper naming, went from `SettingsComposer` to `SettingsDiff::create()` and now `SettingsTree::diff`. Hope this is fine and easier to grasp now. (I admit the code and different states are confusing, map vs tree and so on and tried to explain via docblocks)
  16. Benjamin Franzke commented on patch set 11 02/06/25, 15:40

    SettingsComposer.php:23 Reply

    (ping) Are you okay with the changed naming? (`SettingsTree::diff` instead of `SettingsComposer`)
  17. Christian Kuhn commented on patch set 11 02/06/25, 16:29

    SettingsComposer.php:23 Reply

    sure. thx.
  18. Benjamin Franzke rebased onto patch set 12 V +1 02/28/25, 15:21

  19. core-ci voted on patch set 12 V +1 02/28/25, 15:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74908

  20. Benjamin Franzke rebased onto patch set 13 V +1 03/05/25, 15:32

  21. core-ci voted on patch set 13 V +1 03/05/25, 15:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75185

  22. Benni Mack voted on patch set 13 CR +1 V +1 03/24/25, 10:13

  23. Andreas Kienast voted on patch set 13 CR +1 V +1 03/25/25, 15:30

  24. Benjamin Franzke voted on patch set 13 CR +2 V +2 03/25/25, 15:46

  25. Benjamin Franzke merged patch set 14 03/25/25, 16:01