During development there are cases when you are in a state where module code is gone, but db still requires it to continue. To fix it, you'll have to either put the module back or in my case I've created dummy small module (info file) and then run pmu. This PR is about autoamating the dummy module creation if needed.
Current solutions logic:
The command is ddev pmu module_name because we are used to pmu (I think? Maybe some use the longer version?)
It looks for the module_name from contrib, custom and core module folders.
If it doesn't find it, then it'll create dummy module under custom and clear caches
It then proceeds to run drush pmu
After it's done, it removes the dummy module.
If in step 2 it finds module, then it skips creating dummy module and just run drush pmu
Overview
During development there are cases when you are in a state where module code is gone, but db still requires it to continue. To fix it, you'll have to either put the module back or in my case I've created dummy small module (info file) and then run pmu. This PR is about autoamating the dummy module creation if needed.
Current solutions logic:
ddev pmu module_name
because we are used to pmu (I think? Maybe some use the longer version?)drush pmu
drush pmu
Testing
Install the version from current branch:
1.
Remove some module from your code.
Try to uninstall the module with drush
ddev drush pmu your_module
. It should yell about missing module and it can't proceed.Remove the module with new command
ddev pmu your_module
.