[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:TYPO3com <noreply@typo3.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Jörg Bösche <typo3@joergboesche.de> Reviewed-by:
Susanne Moog <look@susi.dev>
Showing
- typo3/sysext/core/Classes/Core/Bootstrap.php 5 additions, 0 deletionstypo3/sysext/core/Classes/Core/Bootstrap.php
- typo3/sysext/core/Classes/ExpressionLanguage/ProviderConfigurationLoader.php 1 addition, 5 deletions...lasses/ExpressionLanguage/ProviderConfigurationLoader.php
- typo3/sysext/core/Classes/Utility/GeneralUtility.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Utility/GeneralUtility.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php 3 additions, 0 deletions...nd/Tests/Unit/ContentObject/ContentObjectRendererTest.php
- typo3/sysext/install/Classes/Controller/AbstractController.php 8 additions, 2 deletions.../sysext/install/Classes/Controller/AbstractController.php
- typo3/sysext/install/Classes/Controller/UpgradeController.php 14 additions, 7 deletions...3/sysext/install/Classes/Controller/UpgradeController.php
- typo3/sysext/install/Classes/Service/LateBootService.php 5 additions, 2 deletionstypo3/sysext/install/Classes/Service/LateBootService.php
Please register or sign in to comment