Review main Merged

61046[TASK] Switch Locales to regular singleton instance

Benni Mack CR +2 V +2 Normal +64 −19 updated 06/17/19, 14:02

Commit message

Locales resolves the user-defined TYPO3-languages and
its dependencies via TYPO3_CONF_VARS, which are only
finally available when all extensions' ext_localconf.php is included.

For this reason, Locales::initialize() can be deprecated
and moved into the regular constructor, but then the Bootstrap
should not do the initialization anymore, which happens
at the point now, when Locales first gets initialized (which
happens in Frontend within TSFE and PageRenderer and
in Backend within $LANG).

For this reason, it is removed from Bootstrap, where it was
first placed in TYPO3 4.6 when no proper bootstrap
set up was given.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Benjamin Franzke +1
    • TYPO3com +1 CI

Issues 1

Files 6

Review log 1216

  1. Benni Mack uploaded patch set 1 06/17/19, 04:56

  2. TYPO3com voted on patch set 1 V -1 06/17/19, 05:10 Completed build in 13m 05s on Mon, 17 Jun, 07:10 AM Test Summary: 46488 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34372

  3. Benni Mack commented on patch set 2 06/17/19, 06:47

    Published edit on patch set 1.
  4. TYPO3com voted on patch set 2 V +1 06/17/19, 07:19 Completed build in 28m 47s on Mon, 17 Jun, 09:19 AM Test Summary: 46488 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34375

  5. Benjamin Franzke voted on patch set 2 CR +1 06/17/19, 08:35

  6. Benjamin Franzke voted on patch set 2 V +1 06/17/19, 12:33

  7. Benni Mack uploaded patch set 3 06/17/19, 12:35

  8. Benjamin Franzke uploaded patch set 4 06/17/19, 12:37

  9. Benjamin Franzke voted on patch set 4 V +1 CR +1 06/17/19, 12:38

  10. TYPO3com voted on patch set 3 V +1 06/17/19, 12:50 Completed build in 14m 52s on Mon, 17 Jun, 02:50 PM Test Summary: 46442 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34383

  11. TYPO3com commented on patch set 4 06/17/19, 12:53 Completed build in 12m 02s on Mon, 17 Jun, 02:53 PM Test Summary: 46442 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-34384

  12. Andreas Kienast voted on patch set 4 CR +1 06/17/19, 13:15

  13. Andreas Kienast commented on patch set 4 06/17/19, 13:31

    Locales.php:158

    Should we use GeneralUtility::makeInstance(self::class) because of the SingletonInterface?
  14. Benjamin Franzke commented on patch set 4 06/17/19, 14:00

    Locales.php:158 Reply

    To be backwards compatible, yes – but to be fully backwards compatible to the prior (side) effects of Locales::initialize() we would even need to reinitialize $sharedInstance->languages and $sharedInstance->localeDependencies.
  15. Andreas Kienast commented on patch set 4 V +2 CR +2 06/17/19, 14:02

    Locales.php:158 Reply Unresolved

    Thanks for the explanation. I think we shouldn't do that, so: rock'n'roll.
  16. Andreas Kienast merged patch set 5 06/17/19, 14:02