Review main Merged

79968[TASK] Modernize array callbacks in EXT:belog and EXT:beuser

Oliver Klee CR +2 V +2 Easy +6 −6 updated 07/12/23, 22:29

Commit message

Add native type declarations and first-class callables for improved
type safety and readability.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1012

  1. Oliver Klee uploaded patch set 1 07/11/23, 12:31

  2. core-ci voted on patch set 1 V +1 07/11/23, 12:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44039

  3. Stefan Bürk commented on patch set 1 07/11/23, 14:28

    BackendUserController.php:408

    Is this safe ?
  4. Oliver Klee commented on patch set 1 07/11/23, 14:37

    BackendUserController.php:408 Reply

    Yes, because we have this data flow: 1. `$compareGroupUidList` is `list<string|int>` (which is a subset of `array<int, string|int>`) as it's the result of `array_keys`. 2. `array_flip($compareGroupUidList)` hence is `array<string|int, int>`. (Took me some time to de-know this, too.)
  5. Benni Mack commented on patch set 1 07/11/23, 16:16

    BackendUserSessionRepository.php:76

    should we also type hint "use (BackendUser $backendUser)"?
  6. Oliver Klee commented on patch set 1 07/11/23, 16:49

    BackendUserSessionRepository.php:76 Reply

    No - `use` doesn't allow type declarations, and adding a type declaration leads to a syntax error. (I've just tried it.)
  7. Oliver Klee commented on patch set 1 07/11/23, 16:54

    BackendUserController.php:408 Reply

    de-know -> de-knot :-)
  8. Oliver Klee rebased onto patch set 2 V +1 07/12/23, 16:58

  9. core-ci voted on patch set 2 V +1 07/12/23, 17:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44089

  10. Benni Mack voted on patch set 2 V +1 CR +1 07/12/23, 21:37

  11. Stefan Bürk commented on patch set 2 V +2 CR +2 07/12/23, 22:29

    BackendUserController.php:408 Reply

    Thanks for clarifing that.
  12. Stefan Bürk merged patch set 3 07/12/23, 22:29