Skip to content

magento-integration: run the uninstall script by registering the module version - #4

Merged
rockwellll merged 1 commit into
mainfrom
fix/uninstall-registration
Oct 28, 2026
Merged

rockwellll merged 1 commit into
mainfrom
fix/uninstall-registration

Conversation

@anyelopetit

Copy link
Copy Markdown
Collaborator

Summary

bin/magento module:uninstall Hellotext_Tracking --remove-data left the Hellotext integration, its OAuth consumer and an active access token, plus the hellotext/* configuration, although Setup/Uninstall.php deletes all of them and the README says the command removes them.

Magento only runs a module's Setup\Uninstall for modules listed in setup_module (Magento\Setup\Model\UninstallCollector). A module that uses declarative schema without setup_version is never added to that table, so the uninstall script was silently skipped.

  • etc/module.xml declares setup_version="1.0.2", so setup:upgrade registers the module.
  • Version 1.0.2 in composer.json and the changelog.

Verification

On the Magento 2.4.7-p10 test store, installing this branch with Composer:

  • Before (1.0.1): no setup_module row; after uninstall, integration still had "Hellotext", 1 OAuth consumer, 1 token and 3 hellotext/* config rows.
  • After (this branch): setup:upgrade adds Hellotext_Tracking 1.0.2 to setup_module; module:uninstall --remove-data prints "Removing data of Hellotext_Tracking" and leaves 0 integrations, 0 consumers, 0 tokens and 0 config rows.

After merge

Tag 1.0.2 and update the package on Packagist (it is not auto-updated yet).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T00:47:53.687863Z 425b9c0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@rockwellll
rockwellll merged commit a1a856a into main Oct 28, 2026
5 checks passed
@rockwellll
rockwellll deleted the fix/uninstall-registration branch October 28, 2026 14:03
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.

2 participants