Remove configuration during module uninstall

If you have some configuration in your modules config/install directory, it didn’t get deleted during module uninstall routine. drush en -y YOURMODULE will throw an error if you try to reinstall your module. But during development – e.g. custom migrations – you will likely find you in a situation where you have repeatedly to to this. I tried the config_devel module. Sadly without much success.

Luckily since beta3 you can add (change record) enforced dependencies. Since then drush pmu -y YOURMODULE will uninstall your config item too.

You have to add:


to all of your config files.

So a drush pmu -y YOURMODULE && drush en -y YOURMODULE will give you a fresh reinstall with all the new config goodness. Not very elegant, but it works.

D8 Custom Migration

I’ve tried the better part of the morning to get an custom migration for D8 up and running. I stumbled on the very first step. Migrate Plus doesn’t recognized my migration. After some hairpulling, I came across a blog post by Mike Ryan.

If in 8.0.x you were implementing migrations by providing .yml files in config/install, you’ll need to rename those files from migrate.migration.* to migrate_plus.migration.* (because it is now the contrib migrate_plus module rather than the core migrate module which implements migration configuration entities).

Simple naming issue – aaah, slapping myself, whosh -. Thats why I dislike fileNameMagic. With some explicit config …, well I guess, I would hunt another thing :S