We have three custom pieces of code for our Drupal website: module, theme and a non-drupal php library. The names of these components have become awkward over time. I would like to rename our custom module from "rsm_library" to "rsm_module".
I created a copy of "rsm_library" on Github as "rsm_module". I then changed all of the internal references from "rsm_library" to "rsm_module". These changes were mostly
use statements. I also made updates to
.module. I then used composer to load the new module into the website so that both "rsm_library" and "rsm_module" are available at
modules/custom. So far so good.
My next step is to uninstall "rsm_library" using the drupal admin gui. I received a warning message saying the listed configuration will be deleted when I uninstall the module:
- three custom blocks
- one REST resource
This seems correct as the support for the blocks/rest is coded in the "rsm_library" module. I looked at the configuration of one of the custom blocks. It contains the following lines -- among others:
dependencies: module: - node - rsm_library
This is likely the interface between the custom module and the custom block. The REST configuration contains a dependency on "rsm_library" but does not include a
I am not sure how to proceed to complete the rename of "rsm_library" to "rsm_module". Perhaps something like this:
- Export the four configurations
- Change the dependencies/provider from "rsm_library" to "rsm_module"
- Should I delete the uuid: line?
- Include the resulting yml in "rsm_module/config/install"
The four configurations will be deleted when I uninstall "rsm_library". They will be included once again when I install "rsm_module". Does this seem to be the correct approach?