Problem/Motivation
Split off as a follow-up from https://git.drupalcode.org/project/drupal/-/merge_requests/14902#note_80... where @longwave writes:
Out of scope but this feels like we need a ConfigImporterFactory to inject these for us.
This is in reference to this fun in core/lib/Drupal/Core/Recipe/Command/RecipeCommand.php:
$config_importer = new ConfigImporter(
$storage_comparer,
$container->get('event_dispatcher'),
$container->get('config.manager'),
$container->get('lock'),
$container->get('config.typed'),
$container->get('module_handler'),
$container->get('module_installer'),
$container->get('theme_handler'),
$container->get('string_translation'),
$container->get('extension.list.module'),
$container->get('extension.list.theme'),
);
Steps to reproduce
Proposed resolution
Use our existing ConfigImporterFactory that Does The Right Thing(tm).
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Comments
Comment #2
mradcliffeI'm tagging for recipe initiative since this is also related to the recipe command.
Comment #3
longwaveTurns out, there already is
\Drupal\Core\Config\ConfigImporterFactorywhich does exactly this, so the recipe command probably just needs updating to use it?Comment #5
longwaveComment #6
dwwTee hee. Sounded familiar. 😅 Nice. Thanks for the pivot. MR looks good. Pipeline is green. Nothing to complain about.
Preference would be to change this only after #3453474: CLI entry point in Drupal Core lands so we don't have to rebase/resolve conflicts in that much larger MR. But it's pretty trivial, so it's probably fine either way.
RTBC'ing for now.
Thanks!
-Derek
Comment #7
dwwComment #8
alexpottCommitted and pushed 3e7ef0a111b to main and 8cc6f0cc753 to 11.x. Thanks!
Comment #12
dwwWow, that was fast! Thanks!