This issue is for adding the "drush features-revert" command. It will be called features-import in 8.x (the fr alias will be maintained).

We will use the config_update module to handle the actual reverting.

Comments

  • mpotter committed 87be9cc on 8.x-3.x
    Issue #2455809: Add "drush fr" command
    
mpotter’s picture

Status: Active » Needs review

Committed to 87be9cc.

This was pretty straightforward. But a couple of notes:

  1. Requires a patch to config_update here: #2455897: Need to allow setting a custom ExtensionInstallStorage to fix the issue with profiles always overriding the extension config
  2. Added a helper function for getting a feature package that allows $any to work with modules not actually marked as "features". This allows the "drush fd" and "drush fim" (drush fr) commands to be used with normal modules to look at config differences and import their updated config

TO DO

Still to-do is to handle *new* config that isn't in the active store yet. The current call to config_update revert assumes the config is already in the active store. Need to call the config_update import function for new config.

  • mpotter committed db9cfd2 on 8.x-3.x
    Issue #2455809: Update to use new config_update patch
    
mpotter’s picture

Commit db9cfd2 changes this to use the newer patch (#5) in #2455897: Need to allow setting a custom ExtensionInstallStorage

mpotter’s picture

Commit 1ca87b1 changes this to use patch #10 in #2455897: Need to allow setting a custom ExtensionInstallStorage which looks like the one to be applied.

  • mpotter committed 1ca87b1 on 8.x-3.x
    git commit -m 'Issue #2455809: Update to latest config_update patch'
    
mpotter’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.