Problem/Motivation

Sometime we had done lot of database changes but we need to export only few of them not all configurations. For example we have enabled some contrib module, created some views and content types, changed site name and email address. Now we want to export only "system.site" configurations only.

Also same for import, suppose from our configuration folder we have to just import 2 or 3 or specific set of configurations only not all configurations.

There is no solution available for above problem.

Proposed resolution

Create event subscriber which will implement "config.transform.import" and "config.transform.export" events kind of implement in Drupal\Core\EventSubscriber\ExcludedModulesEventSubscriber , and to get list of configurations from the user on which they want to perform import or export action we can receive this list using setting variable in settings.php just like $settings['config_exclude_modules'] = ['devel', 'stage_file_proxy'];

For example:
$settings['config_import'] = ['views.view.user_admin_people, 'user.mail'];
If this variable is set in settings.php then during config import only "views.view.user_admin_people" and "user.mail" configurations will gone import, not all configurations.

$settings['config_export'] = ['system.site', 'core.extension'];

If this variable is set in settings.php then during config export only "system.site" and "core.extension" configurations will gone export, not all configurations.

Comments

Hardik_Patel_12 created an issue. See original summary.

hardik_patel_12’s picture

Issue summary: View changes
hardik_patel_12’s picture

Status: Active » Closed (works as designed)

As discussed with @bircher in slack channel , closing this issue.