When using Features with the core Configuration Management commands, a common workflow is:
- Update your feature.
- Import the updated feature (drush fim feature-name) (i.e. "revert")
- Run "drush config-export" to export the new config into the config/sync directory.
- Review the changes, then git-commit and git-push the config/sync changes into the git repo
The problem with this workflow, is that when the full "config-export" is done, *all* of the current dev's config gets exported. Not just the changes being made to feature, but *any* other change that was made (such as any temporary test fields, or other config changes).
While you can use git to "cherry-pick" the changes, it still is too easy for multiple devs on a project to commit unwanted config changes.
To improve this workflow, I am proposing a new "drush features-sync feature-name" command. This command will do two things:
- Import the feature into the DB (same as features-import)
- Export only the config that was just imported into the config/sync directory.
With this command, only the config being changed in the feature you are working on will be exported to config/sync, minimizing the extra changes from other tickets or testing.
Comments