Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I love the idea of importing a whole site into a fresh environment, and having it automatically download and install the needed modules. That would be slick! But first, let's fix this part so that config files know which modules they need.
This also makes me wonder if the config files should have a list of dependencies, rather than a single module. e.g. a
$config = config('node.type.foo'); $config->set('my_module_setting', 'foo'); $config->addDependency('my_module'); $config->save();
Then importing the content type config file would know it needs not just the node module but also the extending module(s). Right now we don't actually track this at all, so we have no idea that a module that extends an existing config file would also be needed.
I don't yet know if this is a good idea, but the use case that occurs to me for config files declaring dependencies would be if we allow batching config file into recipes, ala: #3763
I created an experimental project, which is basically a library of config recipes to add features to a site. https://github.com/backdrop-contrib/config_recipes
These recipes include the config for a content types, custom fields and field instances, as well as views. An example recipe that is included is
This use case assume that the Backdrop equivalent for the features module involves packages of config files. Other might have better ideas for accomplishing this goal.