Not sure if this is supposed to be supported, but if I split out my core.extension.yml file, and then try and run a config-split-import I get the following error:

PHP Fatal error: Call to undefined method Drupal\cm_config_tools\ConfigInstaller::getSourceStorage() in /var/www/wateraid/mysite/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 128

Comments

Leon Kessler created an issue. See original summary.

bircher’s picture

Project: Configuration Split » ComputerMinds Config tools

This looks like an issue with cm_config_tools, both from the error message and because even though that is quite a strange use case it would still work with config_split. The blacklisted modules wouldn't have an effect though because you split off the core.extensions and they then take precedence for what will be enabled when merging the splits.

cm_config_tools uses their own way of managing the configuration synchronization workflow, and use their own directories and not the config.storage.sync service. It probably doesn't merge the folders the way config_split splits them. To me it seems that the two modules try to solve the same use case but with different methods and are therefore not compatible.

I am transferring it to the cm_config_tools queue, feel free to close it the use case is not supported.

james.williams’s picture

Oo crikey, someone's using cm_config_tools together with another config workflow module ... I'll take a look, but I'm not sure I'd encourage cm_config_tools to be used together with another config workflow module like config_split, as they're for quite different workflow use cases.

I have never tried ensuring core.extension will work with cm_config_tools by the way, so that may well be the issue, I don't know. It may be that I just need to explicitly stop that being supported, or at least document it if it can't be made to work.

Having said that, just because I didn't design it to work, doesn't mean it can't! I'll take a look to see if there's a simple solution but it would help to know: what's your reason for using both cm_config_tools and config_split together?

If it's just for evaluating the two, I can't really help - I'd need a 'real' use case please to work towards.

james.williams’s picture

Category: Bug report » Support request

(Changing to support request because I don't think this is to do with the intended use case for cm_config_tools. I'll happily change that once we've got some answers to figure things out :-) )

Leon Kessler’s picture

Status: Active » Closed (won't fix)

Ah sorry my bad. Was prototyping a plethora of config management modules, and inadvertently had them both enabled. No actual use-case for using the two modules together so think this ticket can be closed.

james.williams’s picture

Done some more digging ... turns out this isn't specifically to do with config_split either, but would actually happen if ever doing a configuration synchronisation (i.e. using the core config sync), that causes a module to be newly installed, whilst cm_config_tools is enabled.

Reality is that cm_config_tools is to be used for a workflow that doesn't use core config sync (but the drush cmci/cmce commands instead). But I think this could certainly be considered a bug. Unfortunately the bug is really in core, because the method being called isn't in the ConfigInstallerInterface, so cm_config_tools doesn't know it should implement that method. Core's ModuleInstaller should not call the (public) getSourceStorage() method, because it is assuming which class is being used for a service, whereas it should only assume what the interface states. I'm going to open a core issue!