Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
While trying to fix a problem with an error on uninstall, "checking" for things before uninstalling was the general solution. While searching for how to do that, it was a lot of not finding a mention of ModuleUninstallValidatorInterface.
Steps to reproduce
N/A
Proposed resolution
Add ModuleUninstallValidatorInterface hint to hook_uninstall docs.
Remaining tasks
- get feedback on the idea. maybe another location?
- TBD
User interface changes
N/A
API changes
Yes, to the docs, but not functionality.
Data model changes
N/A
Release notes snippet
N/A
Issue fork drupal-3214395
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
YesCT CreditAttribution: YesCT at Lullabot for Iowa State University commentedComment #4
paulocsIMHO this should be added.
It will be easier to know how it should be implemented if a developer wants to add a verification that affects the admin UI.
Even if the
ModuleUninstallValidatorInterface
is well documented, it is more logical that the first thing a person will have in mind is use thehook_uninstall
module.I'll move to RTBC and see what the maintainers will say about it after the tests pass.
Comment #5
paulocsComment #7
catchYes this is a good idea.
Committed/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!