Review main Merged

76644[TASK] Add more descriptive information to locales class

Benni Mack CR +2 V +2 Normal +34 −19 updated 11/16/22, 18:34

Commit message

This change updates some comments for better understanding
TYPO3-internal system languages vs. locales, and makes the
class strict.

Also the type annotations are more specific now, and an
additional type check has been introduced.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1317

  1. Benni Mack uploaded patch set 1 11/16/22, 16:19

  2. core-ci voted on patch set 1 V +1 11/16/22, 16:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33828

  3. Christian Kuhn voted on patch set 1 V +1 CR +1 11/16/22, 16:28

  4. Oliver Klee commented on patch set 1 11/16/22, 16:31

    We can also defined the types more.

    Locales.php:40

    @var array<non-empty-string, non-empty-string>

    Locales.php:113

    @var array<non-empty-string, non-empty-string>

    Locales.php:142

    @var array<non-empty-string, array{0: non-empty-string}>

    Locales.php:171

    @return array<int, non-empty-string>

    Locales.php:179

    @return array<non-empty, non-empty-string>

    Locales.php:188

    @return array<non-empty, non-empty-string>

    Locales.php:199

    @return array<int, non-empty-string>

    Locales.php:222

    @return non-empty-string
  5. Benni Mack uploaded patch set 2 11/16/22, 17:04

  6. Benni Mack commented on patch set 2 11/16/22, 17:05

    @Oli can you recheck please?
  7. core-ci voted on patch set 2 V -1 11/16/22, 17:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33829

  8. Oliver Klee commented on patch set 2 11/16/22, 17:17

    Okay, PHPStan is not happy yet. I'll push a new version in a minute. Hold on.

    Reply

    I'll have a look if PHPStan is happy, and then vote. Thanks for the cleanup!
  9. Oliver Klee uploaded patch set 3 11/16/22, 17:26

  10. Oliver Klee commented on patch set 3 V +1 CR +1 11/16/22, 17:28

    Locales.php:40 Reply

    Done

    Locales.php:113 Reply

    Done

    Locales.php:142 Reply

    Unfortunately doesn't work unless we also make the part where $GLOBALS['TYPO3_CONF_VARS']['SYS']['localization']['locales']['dependencies'] is used more type-safe.

    Locales.php:171 Reply

    Done

    Locales.php:179 Reply

    Done

    Locales.php:188 Reply

    Done

    Locales.php:199 Reply

    Done

    Locales.php:222 Reply

    Done
  11. Oliver Klee updated the commit message in patch set 4 11/16/22, 17:29

  12. Oliver Klee voted on patch set 4 V +1 CR +1 11/16/22, 17:29

  13. core-ci voted on patch set 3 V +1 11/16/22, 17:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33830

  14. core-ci voted on patch set 4 V +1 11/16/22, 17:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33831

  15. Christian Kuhn voted on patch set 4 V +2 CR +2 11/16/22, 17:49

  16. Christian Kuhn merged patch set 5 11/16/22, 17:49

  17. Benni Mack commented on patch set 5 11/16/22, 18:34

    thanks to you two!