Review main Merged

92250[TASK] Reduce more state in EditDocumentController

Benni Mack CR +2 V +2 Hard +376 −397 updated 01/09/26, 09:44

Commit message

Further refactoring of the EditDocumentController:

1. Added type declarations to properties
2. Removed instance properties and converted to local variables
- $R_URL_getvars → local $queryParamsToBeUsedForGeneratingCurrentUrl
- $R_URI → ?UriInterface $currentEditingRequestUrl = null (renamed & typed)
3. Handed over variables in methods to avoid requiring state
of the class.
4. Also converted nested conditions to early returns (guard clauses)
5. Moved compileStoreData() call earlier in the flow for better organization
6. Consolidated editconf updates in processData method
7. Removed currentEditingRequestUrl property

More optimizations are also done to avoid fetching
the full record multiple times during one request.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1624

  1. Benni Mack uploaded patch set 1 01/05/26, 13:31

  2. core-ci voted on patch set 1 V -1 01/05/26, 13:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92989

  3. Benni Mack uploaded patch set 2 V -1 01/05/26, 14:50

  4. core-ci voted on patch set 2 V -1 01/05/26, 15:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92992

  5. Benni Mack rebased onto patch set 3 V -1 01/05/26, 20:52

  6. core-ci voted on patch set 3 V -1 01/05/26, 21:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93005

  7. Benni Mack updated the commit message in patch set 4 V -1 01/06/26, 15:26

  8. core-ci voted on patch set 3 V -1 01/06/26, 15:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93005

  9. core-ci voted on patch set 4 V -1 01/06/26, 15:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93027

  10. Benni Mack uploaded patch set 5 V -1 01/06/26, 16:45

  11. core-ci voted on patch set 5 V +1 01/06/26, 16:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93029

  12. Georg Ringer voted on patch set 5 CR +1 V +1 01/06/26, 18:56

  13. Simon Schaufelberger commented on patch set 5 01/06/26, 19:15

    EditDocumentController.php:258

    how about queryParamsForGeneratingCurrentUrl ? I find that variable name a bit too long
  14. Benni Mack uploaded patch set 6 CR +1 V +1 01/06/26, 20:57

  15. core-ci voted on patch set 6 V +1 01/06/26, 21:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93030

  16. Simon Schaufelberger commented on patch set 6 CR +1 01/06/26, 21:07

    EditDocumentController.php:258 Reply

    Done
  17. Georg Ringer voted on patch set 6 CR +1 V +1 01/07/26, 09:52

  18. Markus Klein commented on patch set 6 01/07/26, 21:58

    EditDocumentController.php:1051

    should we adjust the name of the function as well then, if it now returns a result instead of settings something?
  19. Benni Mack uploaded patch set 7 CR +1 V +1 01/08/26, 10:26

  20. Benni Mack commented on patch set 7 01/08/26, 10:26

    EditDocumentController.php:1051 Reply

    Done
  21. core-ci voted on patch set 7 V +1 01/08/26, 10:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93102

  22. Simon Schaufelberger voted on patch set 7 CR +1 V +1 01/08/26, 10:59

  23. Anja Leichsenring voted on patch set 7 CR +2 V +2 01/09/26, 09:44

  24. Anja Leichsenring merged patch set 8 01/09/26, 09:44