Skip to content
Snippets Groups Projects
Commit 0c8317cd authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[BUGFIX] Inject logger into YamlFileLoader

YamlFileLoader needs to be instantiated via `self::new` to
ensure that a logger instance is injected.

The issues was introduced with #103187 where YamlFileLoader was added to
be provided by the EXT:install ServiceProvider. This is actually not
quite right, as a service is always to be provided by the extension that
ships the service, not by the consumer.

Therefore the YamlFileLoader service definition is now moved into
EXT:core.

Resolves: #103444
Related: #103187
Releases: main
Change-Id: Ifa3b690a43239c26903443789f59fcd2768fd9d5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83553


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 85b00d0d
Branches
Tags
No related merge requests found
......@@ -58,6 +58,7 @@ class ServiceProvider extends AbstractServiceProvider
Database\ConnectionPool::class => self::getConnectionPool(...),
Database\DriverMiddlewareService::class => self::getDriverMiddlewaresService(...),
Charset\CharsetConverter::class => self::getCharsetConverter(...),
Configuration\Loader\YamlFileLoader::class => self::getYamlFileLoader(...),
Configuration\SiteConfiguration::class => self::getSiteConfiguration(...),
Command\ListCommand::class => self::getListCommand(...),
HelpCommand::class => self::getHelpCommand(...),
......@@ -178,6 +179,11 @@ class ServiceProvider extends AbstractServiceProvider
return self::new($container, Charset\CharsetConverter::class);
}
public static function getYamlFileLoader(ContainerInterface $container): Configuration\Loader\YamlFileLoader
{
return self::new($container, Configuration\Loader\YamlFileLoader::class);
}
public static function getSiteConfiguration(ContainerInterface $container): Configuration\SiteConfiguration
{
return self::new($container, Configuration\SiteConfiguration::class, [
......
......@@ -109,7 +109,6 @@ class ServiceProvider extends AbstractServiceProvider
Database\PermissionsCheck::class => self::getPermissionsCheck(...),
Mailer::class => self::getMailer(...),
Updates\DatabaseUpdatedPrerequisite::class => self::getDatabaseUpdatedPrerequisite(...),
YamlFileLoader::class => self::getYamlFileLoader(...),
];
}
......@@ -437,11 +436,6 @@ class ServiceProvider extends AbstractServiceProvider
]);
}
public static function getYamlFileLoader(ContainerInterface $container): YamlFileLoader
{
return new YamlFileLoader();
}
public static function configureCommands(ContainerInterface $container, CommandRegistry $commandRegistry): CommandRegistry
{
$commandRegistry->addLazyCommand(
......
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