Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHS-5944: Uninstall Honeypot module #1698

Open
wants to merge 8 commits into
base: 11.6.1-release
Choose a base branch
from
1 change: 0 additions & 1 deletion config/default/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ module:
google_analytics: 0
hal: 0
help: 0
honeypot: 0
hook_event_dispatcher: 0
hs_actions: 0
hs_admin: 0
Expand Down
24 changes: 0 additions & 24 deletions config/default/honeypot.settings.yml

This file was deleted.

17 changes: 0 additions & 17 deletions config/default/ultimate_cron.job.honeypot_cron.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ install:
- 'field_permissions:field_permissions'
- 'focal_point:focal_point'
- 'fontawesome:fontawesome'
- 'honeypot:honeypot'
- 'humsci:hs_actions'
- 'humsci:hs_basic_page'
- 'humsci:hs_basic_page_display'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1175,3 +1175,26 @@ function su_humsci_profile_update_9720() {
...$block_info,
])->save();
}

/**
* Remove honeypot config and uninstall honeypot.
*/
function su_humsci_profile_update_9721() {
// Remove honeypot existing config - needs to be done before uninstall.
$config_factory = \Drupal::configFactory();

$config_names = [
'honeypot.settings',
'ultimate_cron.job.honeypot_cron',
];

foreach ($config_names as $config) {
$config_factory->getEditable($config)->delete();
$message = t('Deleted @config', [
'@config' => $config,
]);
\Drupal::logger('su_humsci_profile')->notice($message);
}

\Drupal::service('module_installer')->uninstall(['honeypot']);
}
Loading