Skip to content
Snippets Groups Projects
Commit 5601673d authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Susanne Moog
Browse files

[BUGFIX] Provide global Symfony container instance in upgrade wizards

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: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarJörg Bösche <typo3@joergboesche.de>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
parent f2d0b637
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment