I'm currently working in #1779026: Convert Text Formats to Configuration System and @yched suggest to replace the creating of text formats in the install profile with .yml files.

It sound reasonable, but brings an interesting issue. At this moment, the only implementation of configurables are Image Styles and Contact Categories. Both issues provide default configurables inside the image and contact modules respectively. But, what happens if an install profile want to provide image styles, or like in my case, text formats?

Do we have a way to load the configuration using something different than this?

// From contact.install 
config('')->set('recipients', array($site_mail))->save();

Proposed resolution

I'm not sure if this is a won't fix, and we have to create configurables using the entity_save method. But maybe we could have something like

config('', source)->set(...)->save();

Where source is a module, profile or theme to search the configurable.


dagmar’s picture

Status: Active » Closed (works as designed)

#1776830-9: [META-1] Installation and uninstallation of configuration provided by a module that belongs to another module's API

The foo module owns both of these pieces of config and is ultimately responsible for their installation and cleanup. When installed, this config is copied to the active config directory. It is copied whether Views is installed or not. When foo is uninstalled, its default config directory (core/modules/foo/config) is scanned, and all matching config is deleted.

I tested this and is working, just place text_format.filter.full_html.yml inside profiles/standard/config/ does the trick.