Skip to content
Snippets Groups Projects
  1. Sep 06, 2023
  2. Sep 05, 2023
  3. Sep 04, 2023
  4. Sep 03, 2023
  5. Sep 01, 2023
  6. Aug 31, 2023
  7. Aug 30, 2023
  8. Aug 29, 2023
  9. Aug 28, 2023
    • Christian Kuhn's avatar
      [BUGFIX] Avoid static state in LocalizationUtility · 727fb0e5
      Christian Kuhn authored
      The extbase ConfigurationManager is (unfortunately)
      a stateful singleton that we can not get rid of
      without a bigger rewrite.
      
      While stateful singletons are bad enough, the
      extbase LocalizationUtility makes this worse by
      parking an instance of ConfigurationManager in
      a static property, re-using it as a "cached"
      singleton.
      
      LocalizationUtility does this since it in itself
      is static, which makes this service just so
      convenient to use. When it comes to sub requests
      and similar, static state is doomed and we need
      to get rid of it, we've had a couple of patches
      in v12 dealing with similar things.
      
      Mid-term, extbase LocalizationUtility needs to
      vanish anyways, but in the meantime, we have to
      get rid of static state that kills sub request scope.
      
      The patch removes the static $configurationManager
      property and adapts functional tests that already
      showed the current solution was a hack. There are
      various upper and lower cache layers that ensure
      removing this "cache layer" won't make things more
      expensive in practice, which allows us to remove
      this static state without further fallback.
      
      In main, this needs a TF update:
      
      > composer u typo3/testing-framework
      
      In 12.4, this need a TF raise:
      
      > composer req --dev typo3/testing-framework:^8.0.3
      
      Resolves: #101779
      Releases: main, 12.4
      Change-Id: Ie5db07b0475f612a996d369ab3417672b33fbb2d
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80737
      
      
      Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      727fb0e5