#111629Inject PackageManager instead of using makeInstance()
Description
Several core classes fetch the PackageManager via GeneralUtility::makeInstance(), although they are built by the container: SiteTcaConfiguration, LanguagePackService, the impexp ImportController and the dashboard ServiceProvider.
AbstractItemProvider and PageRendererBackendSetupTrait additionally create their own SystemResourceIdentifierFactory from it, although the factory is available as a service.
These classes should receive the PackageManager or the SystemResourceIdentifierFactory via dependency injection instead.
This prepares dropping SingletonInterface from PackageManager. That step needs a change in the unit test bootstrap of the testing framework first, as it registers the UnitTestPackageManager via GeneralUtility::setSingletonInstance().
Follow-up of #110578.
Reviews 1
History 01
-
Gerrit Code Review pushed patch set 1 for main to change 98082 status
NewUnder Review 11/26/26, 19:35