Skip to content

Add modules:remove command - #147

Open
Amad3eu wants to merge 1 commit into
InterNACHI:mainfrom
Amad3eu:feat/modules-remove
Open

Amad3eu wants to merge 1 commit into
InterNACHI:mainfrom
Amad3eu:feat/modules-remove

Conversation

@Amad3eu

@Amad3eu Amad3eu commented Sep 30, 2026

Copy link
Copy Markdown

Closes #71

What it does

php artisan modules:remove {name} reverses what make:module sets up:

  • Deletes the module directory
  • Removes the module's package (read from its own composer.json name) from require / require-dev in the application composer.json
  • Clears the module cache and reloads the registry
  • Prints the composer update <package> command to run afterwards

It asks for confirmation before deleting anything (--force skips it; declining or running non-interactively without --force aborts with exit code 1). Unknown module names fail with exit code 1.

The app-modules/* path repository is left alone, since it's shared by every module.

Tests

Added ModulesRemoveTest (removal, other modules untouched, confirmation accepted/declined, unknown module). Full suite passes (136 tests).

Thanks @adam-dziuk for letting me pick this up.

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.

Remove or delete module feature

1 participant