Skip to content

FIX / Clean plugin configuration on uninstall function#1208

Merged
stonebuzz merged 3 commits into
mainfrom
fix-plugin-configuration-deletion-v3
Jun 9, 2026
Merged

FIX / Clean plugin configuration on uninstall function#1208
stonebuzz merged 3 commits into
mainfrom
fix-plugin-configuration-deletion-v3

Conversation

@Mary-Clb

@Mary-Clb Mary-Clb commented Jun 8, 2026

Copy link
Copy Markdown
Contributor
  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • The plugin uninstallation function was missing the deletion of glpi_configs entries belonging to the plugin.

@Mary-Clb Mary-Clb changed the title clean plugin configuration FIX / Clean plugin configuration on uninstall function Jun 8, 2026
@Mary-Clb Mary-Clb marked this pull request as ready for review June 8, 2026 09:30
Comment thread hook.php Outdated
// clean configuration values
$config = new Config();
$config->deleteByCriteria([
'context' => 'plugin_fields',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI run this SQL query

SELECT COUNT(*) FROM glpi_configs WHERE context = 'plugin:{$plugin_key}'

so

Suggested change
'context' => 'plugin_fields',
'context' => 'plugin:fields',

@Mary-Clb

Mary-Clb commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@stonebuzz @Rom1-B can I fix rector error in the CI in this PR ? Or should I open another one

@stonebuzz

Copy link
Copy Markdown
Contributor

@Mary-Clb
Different problems require different pull requests =/

@Mary-Clb Mary-Clb self-assigned this Jun 8, 2026
@Rom1-B Rom1-B requested a review from stonebuzz June 9, 2026 06:04
@stonebuzz

Copy link
Copy Markdown
Contributor

@Mary-Clb can you rebase?

@Rom1-B Rom1-B force-pushed the fix-plugin-configuration-deletion-v3 branch from 86f6050 to 418ba64 Compare June 9, 2026 12:57
@stonebuzz stonebuzz merged commit ce23a66 into main Jun 9, 2026
3 checks passed
@stonebuzz stonebuzz deleted the fix-plugin-configuration-deletion-v3 branch June 9, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants