Review main Merged

74519[TASK] Simplify DataHandler internals code

Benni Mack CR +2 V +2 Normal +23 −35 updated 05/20/22, 12:22

Commit message

This change reduces specialities within DataHandler:

* DataHandler->username is not used, and can be removed.
* Initial check in workspaceCannotEditOfflineVersion() can
  be moved to the caller class, using more useful log entries.
* recordInfo() now fetches the full record from the DB which
  could then be cached separately during runtime.
* Some internal methods are marked as protected, as they
  are trivial to re-implement and currently only used by
  DataHandler anyways.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 2332

Show 47 earlier messages
  1. Benni Mack uploaded patch set 1 05/04/22, 15:34

  2. core-ci voted on patch set 1 V -1 05/04/22, 15:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26831

  3. Benni Mack uploaded patch set 2 05/05/22, 13:10

  4. core-ci voted on patch set 2 V -1 05/05/22, 13:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26881

  5. Benni Mack uploaded patch set 3 05/05/22, 14:35

  6. core-ci voted on patch set 3 V -1 05/05/22, 14:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26882

  7. Benni Mack rebased onto patch set 4 05/13/22, 12:55

  1. core-ci voted on patch set 4 V -1 05/13/22, 13:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27174

  2. Benni Mack commented on patch set 5 05/13/22, 14:04

    Published edit on patch set 4.
  3. core-ci voted on patch set 5 V +1 05/13/22, 14:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27175

  4. Benni Mack updated the commit message in patch set 6 05/13/22, 14:57

  5. core-ci voted on patch set 6 V +1 05/13/22, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27180

  6. Oliver Klee commented on patch set 6 05/13/22, 15:17

    DataHandler.php:8482

    Please let's keep this line as it contains a helpful comment.
  7. Benni Mack commented on patch set 6 05/13/22, 15:51

    DataHandler.php:8482 Reply

    IMHO it contains the same information as the line above?
  8. Oliver Klee commented on patch set 6 05/13/22, 15:52

    Ah, you're right!

    DataHandler.php:8482 Reply

    Ack
  9. Oliver Klee commented on patch set 6 05/13/22, 15:56

    DataHandlerHook.php:487

    I propose to make this the first check before the getRecord call: This will improve performance as this check does not involve a DB request, while the getRecord call does.
  10. Stefan Bürk uploaded patch set 7 05/13/22, 18:24

  11. Stefan Bürk commented on patch set 7 05/13/22, 18:25

    DataHandlerHook.php:487 Reply

    Pushed. @Benni, is this okay for you ?
  12. Stefan Bürk updated the commit message in patch set 8 05/13/22, 18:26

  13. core-ci voted on patch set 8 V +1 05/13/22, 18:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27189

  14. core-ci voted on patch set 7 V +1 05/13/22, 18:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27188

  15. Benni Mack commented on patch set 8 05/13/22, 21:29

    thanks!

    DataHandlerHook.php:487 Reply

    Ack
  16. Oliver Klee voted on patch set 8 CR +1 05/15/22, 09:45

  17. Stefan Bürk rebased onto patch set 9 05/16/22, 23:28

  18. Stefan Bürk voted on patch set 9 V +1 CR +1 05/16/22, 23:29

  19. core-ci voted on patch set 9 V +1 05/16/22, 23:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27272

  20. Oliver Klee voted on patch set 9 CR +1 05/17/22, 08:00

  21. Oliver Klee commented on patch set 9 05/19/22, 13:47

    @Benni: How could I test this change?
  22. Benni Mack commented on patch set 9 05/20/22, 07:32

    Reply

    By running through all commands Datahandler offers. However, DataHandler is pretty much covered (I'd say 99%) with functional tests, so if the tests agree and some basics have been checked (saving records), we're good IMHO.
  23. Oliver Klee voted on patch set 9 V +1 05/20/22, 09:18

  24. Oli Bartsch voted on patch set 9 V +2 CR +2 05/20/22, 12:22

  25. Oli Bartsch merged patch set 10 05/20/22, 12:22