Skip to main content
nik's personal space

Main navigation

  • About
  • Profile
  • Blogs
  • Achievements
  • Reach nik
User account menu
  • Log in

Breadcrumb

  1. Home

Drupal 8: Reverting features in update hooks

For all the developers of Drupal who had a very good development workflow in place and used to revert features in hook_update_N() to ensure the deployment notes were simply to run update.php or drush updb, there is a good news :)

Project that I'm currently working is in install mode and we are really happy to use features and CMI and get all the configurations stored into modules but today I got a call from the product manager asking me to do include the code in update hooks to ensure it doesn't require re-installing the demo site. At first moment, I was like sure will do that but realised in next few mins, isn't that removed from features in D8? Wait, how will I do this, there is no documentation about reverting configurations, we have drush cim, cex and UI ---- and there came my answer, let me debug and find out how the UI is doing it.

After few mins again, I found the solution - it was just two lines of code, seriously? Yeah, its a bit tricky though.



 
You can get the parameter details from the config file
Param 1: module key in the config file
Param 2: id key in the config file
Behat tests with Lando and Apple M1
Knowledge required as PHP developer
Drupal - Tips to keep browser CPU usage in check
Thinking about customer success as a developer
Developing or testing Apple Pay
Being pro-active as developer
Effective communication, how I do it
Migrating multi-value non-associative data
Drupal 8: Updating field configuration in update hooks
Life saver - live dev on Magento Cloud
Certified SAFe® 6 Agilist Badge
BMI IQ - 135
Acquia Certified Cloud Pro 2020
Acquia Certified Front End Specialist - Drupal 9
Triple Certified Drupal Expert - Drupal 9
Acquia Certified Developer - Drupal 9
Acquia Certified Site Studio 6 Site Builder
Acquia Certified Back End Specialist - Drupal 9
Acquia Certified Site Factory Pro
Acquia Certified Developer - Drupal 8
Acquia Certified Developer - Drupal 7
Certified ScrumMaster®
Powered by Drupal