• Benjamin Franzke's avatar
    [BUGFIX] Provide global Symfony container instance in upgrade wizards · 5601673d
    Benjamin Franzke authored and Susanne Moog's avatar Susanne Moog committed
    Upgrade wizars may contain legacy code that requires services
    using makeInstance. As makeInstance needs to use the PSR-11 container
    for services that require dependency injection, we need to provide
    the global container intance during upgrade wizard execution.
    
    Also ensure that only *one* (singleton) PackageManager instance is used:
    ProviderConfigurationLoader used to create a second PackageManager
    instance. It passed a constructor argument which caused GU::makeInstance
    to bypass the symfony (PSR-11) container and to create a new instance
    (on its own). This new instance was then cached as singleton instance and
    all subsequent makeInstance calls returned this instance instead of the
    global instance. Therefore we now ensure that new singleton instances
    will not be cached if the singleton is known by the PSR-11 container.
    This inconsistency caused the Typo3DbExtractionUpdate to fail because
    some codepaths used one PackageManager instance (through DI) and some
    codepaths another instance (through makeInstance).
    
    Change-Id: I947310d1c2e46f7ded6399ad48d94efa9854f347
    Releases: master
    Resolves: #89504
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62425
    
    
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
    Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Reviewed-by: default avatarJörg Bösche <typo3@joergboesche.de>
    Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
    5601673d