Review main Merged

91159[DOCS] Avoid using the constant $GLOBALS['LANG']

TYPO3com CR +2 V +2 Easy +10 −6 updated 10/21/25, 15:36

Commit message

At https://docs.typo3.org/permalink/t3coreapi:extension-localization-php
we write:

The :php:`\TYPO3\CMS\Core\Localization\LanguageService` could formerly be
accessed via the global variable :php:`$GLOBALS['LANG']`. This is now
discouraged. Use :php:`LanguageServiceFactory` instead.

So we should not use the discouraged practice in new changelog entries.
PPl are prone to copy & paste. And the constant is expecially misleading
as it is available while a backend user is logged in so you might not
notice right away that it is actually not working in frontend context.

Review

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

Issues 1

Files 1

Review log 35

  1. TYPO3com uploaded patch set 1 10/19/25, 05:55

  2. Lina Wolf commented on patch set 1 10/19/25, 05:56

    Watching
  3. core-ci voted on patch set 1 V +1 10/19/25, 06:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87005

  4. Benni Mack commented on patch set 1 CR +2 V +2 10/21/25, 15:36

    thanks, will merge right away
  5. Benni Mack merged patch set 2 10/21/25, 15:36