Review main Merged

92211[TASK] Decouple BackendUserAuthentication::writelog

Oliver Hader CR +2 V +2 Hard +399 −62 updated 01/21/26, 08:56

Commit message

Allow logging to the sys_log database table without having to
route through BackendUserAuthentication.

BackendUserAuthentication::writelog now forwards the invocation
to the new TYPO3\CMS\Core\SysLog\Repository\LogEntryRepository.

This is a preparation for decoupling permission handling from the
necessity of always having a BackendUserAuthentication instance.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Georg Ringer +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Georg Ringer +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 2633

Show 68 earlier messages
  1. Oliver Hader uploaded patch set 1 12/22/25, 21:06

  2. core-ci voted on patch set 1 V +1 12/22/25, 21:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92587

  3. Markus Klein commented on patch set 1 12/22/25, 22:41

    LogEntryRepository.php:95

    should we take the chance to rewrite these descriptions as well?
  4. Oliver Hader marked it work in progress 12/23/25, 09:42

  5. Oliver Hader uploaded patch set 2 V +1 12/23/25, 11:14

  6. Oliver Hader commented on patch set 2 12/23/25, 11:16

    This change is ready for review.

    LogEntryRepository.php:95 Reply

    Yes. I've updated the comments and added some more context...
  7. core-ci voted on patch set 2 V +1 12/23/25, 11:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92611

  8. Oliver Hader commented on patch set 2 12/23/25, 11:30

    ProcessingContext.php:27

    Argh, I need to adjust this one here...
  1. Oliver Hader uploaded patch set 3 V +1 12/23/25, 11:45

  2. Oliver Hader commented on patch set 3 12/23/25, 11:47

    This change is ready for review.

    ProcessingContext.php:27 Reply

    Done
  3. core-ci voted on patch set 3 V +1 12/23/25, 11:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92613

  4. Simon Schaufelberger commented on patch set 3 12/23/25, 13:39

    LogEntryRepository.php:50

    Why is this deprecated and what should be used instead? Please make that clear. Also "might" is not good, otherwise this will survive longer most likely if no good alternative is provided.

    LogEntryRepository.php:106

    indentation is not correct by 1 char

    DataHandlerTest.php:77

    can this namespace be imported?
  5. Christian Kuhn commented on patch set 3 CR -1 12/23/25, 13:42

    LogEntryRepository.php:157

    could we please somehow solve that differently to not introduce a new getIndpEnv() that will be hard to get rid off later?
  6. Oliver Hader commented on patch set 3 12/23/25, 13:51

    LogEntryRepository.php:50 Reply

    This is an intermediate solution in order to get started with permission sets. Thus, it's known that this method will vanish...

    LogEntryRepository.php:157 Reply

    What do you suggest? Passing the request object through data-handler to the log-repository just to resolve `NormalizedParams` would not be helpful.
  7. Christian Kuhn commented on patch set 3 12/23/25, 13:56

    LogEntryRepository.php:157 Reply

    well, if that is a data dependency, than it needs to be hand over. probably not the full request, but the remote address only if needed. grabbing from globals directly or indirectly is no good option for a new api, i'd say. not logging IP at all couldl be an option, too. and it is a pity getindpenv() still exists, it should be gone for a long while already. it is on my list for v14, so please let us not introduce new consumers.
  8. Oliver Hader uploaded patch set 4 CR -1 V +1 12/23/25, 14:02

  9. Oliver Hader commented on patch set 3 12/23/25, 14:06

    LogEntryRepository.php:50 Reply

    Done

    LogEntryRepository.php:106 Reply

    Done

    LogEntryRepository.php:157 Reply

    However, `getindpenv()` is still there and used a lot in the TYPO3 core... I've added an explicit `$request` parameter now, with a fall-back to the global request. Dropping that information just because our internal API sucks is not really an option for me.
  10. Oliver Hader commented on patch set 4 12/23/25, 14:07

    DataHandlerTest.php:77 Reply

    Done
  11. Oliver Hader uploaded patch set 5 12/23/25, 14:13

  12. core-ci voted on patch set 4 V -1 12/23/25, 14:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92621

  13. core-ci voted on patch set 5 V -1 12/23/25, 14:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92622

  14. Oliver Hader uploaded patch set 6 V -1 12/23/25, 16:36

  15. core-ci voted on patch set 6 V +1 12/23/25, 16:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92623

  16. Christian Kuhn commented on patch set 6 12/24/25, 09:52

    LogEntryRepository.php:157 Reply

    ok. so this way we at least have the argument already and could deprecate / handle usages and fallbacks when needed. that's much better than before and we don't rely on getIndpEnv(). i can live with that. thank you!
  17. Simon Schaufelberger voted on patch set 6 CR +1 12/24/25, 11:44

  18. Oliver Hader wrote 01/06/26, 10:28

    Topic set to permission-set
  19. Benni Mack voted on patch set 6 CR +1 V +1 01/06/26, 12:13

  20. Oliver Hader rebased onto patch set 7 CR +1 V +1 01/21/26, 08:10

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

  22. Georg Ringer voted on patch set 7 CR +1 V +1 01/21/26, 08:38

  23. Benni Mack voted on patch set 7 CR +1 V +1 01/21/26, 08:50

  24. Oliver Hader voted on patch set 7 CR +2 V +2 01/21/26, 08:56

  25. Oliver Hader merged patch set 8 01/21/26, 08:56